Home > Enterprise >  Setup IIS Identity in an ApplicationPool using cmd or ps1
Setup IIS Identity in an ApplicationPool using cmd or ps1

Time:10-01

is there an example of setting the Identity in IIS for a Custom User in an Application Pool using command line or powershell script?

CodePudding user response:

Should be able to do something like this:

Set-ItemProperty -Path "IIS:\AppPools\$AppPoolName" -Name processModel -Value @{userName=$AppPoolUser;password=$AppPoolUserPw;identitytype=3}

See documentation for processModel here: image1

3.Then enter the appcmd.exe command line, you need to replace the content in the red box. image2

4.Then you can see that the application pool identity is successfully set as a custom account. image3

Hope my answer can help you!

  • Related