How to specify application pool identity user and password from PowerShell

前端 未结 4 1401
独厮守ぢ
独厮守ぢ 2021-02-02 07:44

I have been having lots of difficulty automating the setup of a Web application and configuring IIS appropriately with the Application Pool Identity. I am doing this in a Web a

4条回答
  •  囚心锁ツ
    2021-02-02 08:15

    You would do this as follows:

    Import-Module WebAdministration
    Set-ItemProperty IIS:\AppPools\app-pool-name -name processModel -value @{userName="user_name";password="password";identitytype=3}
    

    See this document here for an explanation, and a reference of the indentity type numeric for the user type you will run the app pool under: http://www.iis.net/configreference/system.applicationhost/applicationpools/add/processmodel

提交回复
热议问题