开发者

Powershell Website credentials help

开发者 https://www.devze.com 2023-03-12 06:13 出处:网络
I\'m using powershell to create a web site in IIS.One of the requirements of the script is that it sets a specific user for connect as.My question is how do I set this property in powershell. I need t

I'm using powershell to create a web site in IIS. One of the requirements of the script is that it sets a specific user for connect as. My question is how do I set this property in powershell. I need to set the password as well , and select 'Specific user' in the Connect As Dialog box. I also need to set the ip address in my binding statement.

My current script...

New-Item IIS:\Sites\www.repair-information.net -bindings @{protocol='http';bindingInformation=':8080:www.ri.net'} 开发者_开发技巧-PhysicalPath c:\ri\Web

Does anyone know how I can properly set these attributes using powershell. Thanks for any tips or tricks. I found this site that has all the attributes for Application Pools, does anyone know if a similiar site exists for web site specific attributes? App Pool powershell attribs

Thanks so much for any help,

~ck


If you're running Windows 7 or Windows Server 2008 R2 you should have the IIS Administration Cmdlets available to use. If you need to load the module type Import-Module WebAdministration then type Get-Command WebAdministration\* to see all the commands. You'll want to check out the cmdlet docs I linked below for specifics.

Web Server (IIS) Administration Cmdlets in Windows PowerShell

0

精彩评论

暂无评论...
验证码 换一张
取 消