![](/img/trans.png)
[英]How to Backup IIS website folder physical Path before deploying using using Nant or PowerShell in Teamcity
[英]How to set an IIS Website's Physical Path credentials through Powershell?
您可以使用以下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"
问候,贾尔帕。
您可以使用set-webconfiguration cmdlet,它是WebAdministration模块的一部分。
import-module WebAdministration
Set-WebConfiguration -Filter "/system.applicationHost/sites/site[@name='Default Web Site']/application[@path='/']/virtualDirectory[@path='/']" -Value @{userName='YourDomain\User'; password='Pa$$word'}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.