Last active
December 15, 2015 15:28
-
-
Save robertpateii/5281652 to your computer and use it in GitHub Desktop.
Windows PowerShell commands I use when switching development environments.
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
*Change Apache target:* | |
gvim C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf | |
*Bring up Wamp:* | |
Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "net stop w3svc"' | |
&"C:\wamp\wampmanager.exe" | |
*Open Browsers:* | |
&"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "http://127.0.0.1" | |
&"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "http://127.0.0.1" | |
&"~\AppData\Local\Google\Chrome\Application\chrome.exe" "http://127.0.0.1/" | |
*Bring IIS backup:* | |
Start-Process "$pshome\powershell.exe" -Verb Runas -ArgumentList '-command "net stop wampapache"' | |
Start-Process "$pshome\powershell.exe" -Verb Runas -ArgumentList '-command "net stop wampmysqld"' | |
Start-Process "$pshome\powershell.exe" -Verb Runas -ArgumentList '-command "C:\wamp\wampmanager -quit -id={wampserver}"' | |
Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "net start w3svc"' | |
*Restart Apache* | |
Start-Process "$pshome\powershell.exe" -Verb Runas -ArgumentList '-command "net stop wampapache"' | |
Start-Process "$pshome\powershell.exe" -Verb Runas -ArgumentList '-command "net start wampapache"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment