# How can I set up IIS website identity fields via WebAdministration cmdlets?

**URL:** <https://forums.powershell.org/t/how-can-i-set-up-iis-website-identity-fields-via-webadministration-cmdlets/12272>\
**Category:** PowerShell Help\
**Created:** [March 27, 2019, 12:05pm UTC](https://forums.powershell.org/t/how-can-i-set-up-iis-website-identity-fields-via-webadministration-cmdlets/12272 "2019-03-27T12:05:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjacobs](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@sjacobs](https://forums.powershell.org/u/sjacobs)\
**Post date:** [March 27, 2019, 12:05pm UTC](https://forums.powershell.org/t/how-can-i-set-up-iis-website-identity-fields-via-webadministration-cmdlets/12272/1 "2019-03-27T12:05:57Z")

</div>

Looking for help on how to set the IIS **website** - NOT application pool - identity fields via the PowerShell WebAdministration module. I have many IIS servers (with many web sites on each) that need to have their passwords reset.

TIA.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [March 27, 2019, 12:22pm UTC](https://forums.powershell.org/t/how-can-i-set-up-iis-website-identity-fields-via-webadministration-cmdlets/12272/2 "2019-03-27T12:22:04Z")

</div>

I have seen you already asked this in StackOverflow … did you try to ask this in a dedicated IIS forum like [https://forums.iis.net](https://forums.iis.net) ?

---

<div class="post-metadata">

**Author:** ![pwshliquori](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/pwshliquori/32/222_2.png) [@pwshliquori](https://forums.powershell.org/u/pwshliquori)\
**Post date:** [March 27, 2019, 1:05pm UTC](https://forums.powershell.org/t/how-can-i-set-up-iis-website-identity-fields-via-webadministration-cmdlets/12272/3 "2019-03-27T13:05:52Z")

</div>

Hi TIA,

You should be able to use the `Get-WebConfigurationProperty` and `Set-WebConfigurationProperty` to change the values. To see the existing configuration run:

[pre]  
Get-WebConfigurationProperty -PSPath “MACHINE/WEBROOT/APPHOST” -Filter “/system.applicationHost/sites/site[@name=‘site1’]/virtualDirectoryDefaults” -Name .  
[/pre]

Setting the credentials:

[pre]  
Set-WebConfigurationProperty -PSPath “MACHINE/WEBROOT/APPHOST” -Filter “/system.applicationHost/sites/site[@name=‘site1’]/virtualDirectoryDefaults” -Name userName -Value ‘user’

Set-WebConfigurationProperty -PSPath “MACHINE/WEBROOT/APPHOST” -Filter “/system.applicationHost/sites/site[@name=‘site1’]/virtualDirectoryDefaults” -Name password -Value ‘Password’  
[/pre]

pwshliquori

---

<div class="post-metadata">

**Author:** ![sjacobs](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@sjacobs](https://forums.powershell.org/u/sjacobs)\
**Post date:** [March 28, 2019, 1:34pm UTC](https://forums.powershell.org/t/how-can-i-set-up-iis-website-identity-fields-via-webadministration-cmdlets/12272/4 "2019-03-28T13:34:40Z")

</div>

Sorry for the delay … I thought the site would email me when responses to my question were received, but I haven’t received anything and only thought to check back just now.

@pwshliquori … thank you … will give it a try and report back.

@Olaf … I _did_ receive an answer from Stack Overflow, but it only came a short while ago. If neither responses pan out, I’ll try [forums.iis.net](http://forums.iis.net).

Thank you both!

Sam

P.S. I see a **Notify me of follow-up replies via email** below. I guess I missed that in my original post.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:33pm UTC](https://forums.powershell.org/t/how-can-i-set-up-iis-website-identity-fields-via-webadministration-cmdlets/12272/5 "2024-05-16T20:33:05Z")

</div>


