powershell - 如何通过 Powershell 设置 IIS 网站物理路径凭据?

标签 powershell iis iis-10

如何通过 Powershell 设置 IIS 10.0 网站的物理路径凭据?

enter image description here

最佳答案

您可以使用以下 Powershell 命令:

Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.applicationHost/sites/site[@name='site1']/application[@path='/']/virtualDirectory[@path='/']" -name "userName" -value "jalpa"

Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.applicationHost/sites/site[@name='site1']/application[@path='/']/virtualDirectory[@path='/']" -name "password" -value "aStrongPassword"

Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.applicationHost/sites/site[@name='site1']/application[@path='/']/virtualDirectory[@path='/']" -name "logonMethod" -value "ClearText"

enter image description here

问候, 贾尔帕。

关于powershell - 如何通过 Powershell 设置 IIS 网站物理路径凭据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55250506/

相关文章:

powershell - 当我以这种方式请求 Get-Service 时,它​​会对我的姓名进行分组,我该如何防止这种情况发生?

c# - 了解 IIS 对 C# 开发人员有多重要?

c# - 在 asp.net 中获取 Windows/域凭据,同时允许在 IIS 中进行匿名访问

IIS7认证问题

asp.net-core-2.0 - OpenCover 覆盖 ASP.Net core 2.0

c# - 检查 Visual Studio 项目的一致性

powershell - 如何在 Visual Studio 解决方案中创建可重用的 PowerShell 函数

asp.net - 如何在 IIS 10 中注册 http 模块

datetime - 使用 PowerShell 将月份数字转换为月份名称

c# - 从 IIS 获取 ERR_CONNECTION_RESET 而日志中没有信息