我正在尝试使用PowerShell在IIS7中创建应用程序池。我希望它在NetworkService帐户下运行,但是目前看来,它试图将自己设置为应用程序池上的“其他”用户,而不是被识别为内置帐户。我的PS当前看起来像这样:Set-ItemProperty $iisAppPoolDir -name processModel -value @{userName="NetworkService";identitytype=3}
现在,这通常还应该具有password="*****";
可用于允许我创建应用程序池并让用户登录的字段。我已将其遗漏,希望它可以被识别,但是不起作用。
任何帮助表示赞赏!
网络服务是其自己的identityType,因此您根本不会设置用户名,而是将identityType设置为2,如下所示:
Set-ItemProperty IIS:\AppPools\MyAppPool -name processModel.identityType -value 2
这会将身份设置为网络服务。
identityType值记录在IIS网站上。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句