Someone needed to add virtual directory to a few dozen sites in IIS, so I wrote them a little script to do it. To use it save the code below as something like ‘CreateVirDirs.ps1’, open a Powershell prompt with administrator rights, cd to the directory you saved it in and then execute it with .CreateVirDirs.ps1 Import-Module WebAdministration $sites = Get-Childitem 'IIS:Sites' $name = "NewVirtualDirectory" $vdPath = "D:Temp" foreach ($site in $sites) { $path = 'IIS:Sites' + $site.Name + '' + $n…

Read More