Created
August 17, 2012 22:44
-
-
Save cromwellryan/3383306 to your computer and use it in GitHub Desktop.
Host a directory using IIS Express a-la python -m http.server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function start-host($root) { | |
$iisexpress = "$env:ProgramFiles\\IIS Express\\iisexpress.exe" | |
if (!(test-path $iisexpress)) { | |
write-error "Unable to locate IIS Express at $iisexpress" | |
return | |
} | |
$approot = resolve-path $root | |
write-host "Starting iisexpress at $approot" | |
start $iisexpress @('/path:' + $approot) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment