Skip to content

Instantly share code, notes, and snippets.

@vadim-kovalyov
Created May 23, 2016 18:52
Show Gist options
  • Save vadim-kovalyov/5b61e2e910a9dd228bdb09188d54305f to your computer and use it in GitHub Desktop.
Save vadim-kovalyov/5b61e2e910a9dd228bdb09188d54305f to your computer and use it in GitHub Desktop.
Creates a virtual directiry in the specified website.
#
# Creates a virtual directiry in the specified website.
#
function Create-IisVirtualDirectory
{
param([string]$DirName, [string]$SiteName, [string]$DirectoryPath)
Import-Module WebAdministration
cd IIS:\
$iisVirtualDir = New-WebVirtualDirectory -Site $SiteName -Name $DirName -PhysicalPath $DirectoryPath -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment