gpt4 book ai didi

powershell - IIS PowerShell应用程序池设置为 'NetworkService'帐户

转载 作者:行者123 更新时间:2023-12-04 16:43:51 25 4
gpt4 key购买 nike

我正在尝试使用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 website上。

关于powershell - IIS PowerShell应用程序池设置为 'NetworkService'帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28966092/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com