Hcabnettek
Hcabnettek

Reputation: 12928

Powershell Website credentials help

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

Upvotes: 1

Views: 900

Answers (1)

chrixian
chrixian

Reputation: 2811

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

Upvotes: 1

Related Questions