CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: PowerShell

Launch ASP.NET Development Server from PowerShell

584 Views
Copy Code Show/Hide Line Numbers
$path = resolve-path .
$rand = New-Object system.random
$port = $rand.next(2048,10240)
$path_to_devserver = "C:\\Program Files (x86)\\Common Files\\microsoft shared\\DevServer\\9.0\\Webdev.WebServer.exe"
 
& $path_to_devserver /port:$port /path:$path
(new-object -com shell.application).ShellExecute("http:\\localhost:$port")
by David R. Longnecker
  September 09, 2009 @ 9:51am
Tags:
Description:
I'm lazy! :D

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate