Skip to content

Instantly share code, notes, and snippets.

@ruslander
Forked from drmohundro/IisExpressJob.ps1
Last active December 21, 2015 17:06
Show Gist options
  • Save ruslander/eb7cec1ad0d5bd6fc59c to your computer and use it in GitHub Desktop.
Save ruslander/eb7cec1ad0d5bd6fc59c to your computer and use it in GitHub Desktop.
PowerShell functions to start/stop IIS Express in the specified directory as a background job
function WebIt($name, $pathToSource, $port) {
Start-Job -Name $name -Arg $pathToSource, $port -ScriptBlock {
param ($pathToSource, $p)
& 'C:\Program Files (x86)\IIS Express\iisexpress.exe' /port:$p /path:$pathToSource
}
}
WebIt "adm" "..\Management.Web" 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment