Skip to content

Instantly share code, notes, and snippets.

@cromwellryan
Created August 17, 2012 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cromwellryan/3383306 to your computer and use it in GitHub Desktop.
Save cromwellryan/3383306 to your computer and use it in GitHub Desktop.
Host a directory using IIS Express a-la python -m http.server
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