Creating IIS7.5 Web Site Root Directories with a Function on Powershell

You can create default web site directories with a function on Powershell:

Function Create-Directories
{
Param ($LogDir)
 
New-Item "$LogDir" -Type Directory
New-Item "$LogDir\db" -Type Directory
New-Item "$LogDir\http" -Type Directory
New-Item "$LogDir\http\bin" -Type Directory
New-Item "$LogDir\http\stats" -Type Directory
New-Item "$LogDir\http\upload" -Type Directory
}

You can execute our function using with this command:

Create-Directories -LogDir "C:\inetpub"

Have fun!

Tags: , , ,


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply