Categories
Archive
![]() Blogroll
|
Creating a new Web Site on IIS7.5 with a Powershell Function
Posted in Hosting & IIS7, Windows Powershell, Windows Server | No Comment | 2,313 views | 27/02/2010 16:12
I’ll show you how to create a New Web site on IIS7.5 with a Powershell function. Function Create-WebSite { Param ($LogDir, $Description, $Domain) $Domain = $Domain.TrimStart("www.") New-Item IIS:\Sites\$Description -Bindings (@{Protocol="http";BindingInformation="*:80:$Domain"},@{Protocol="http";BindingInformation="*:80:www.$Domain"}) -PhysicalPath "$LogDir\http" } You can execute our function using with this command: Create-WebSite -Logdir "C:\inetpub" -Description "My New Web Site" -Domain "www.yusufozturk.info" That’s easy!
Tags: create web site powershell, create web site powershell iis7.5, iis7.5 auto web site create, iis7.5 create-website function, iis7.5 powershell functions
Leave a Reply
|