Last active
August 29, 2015 13:57
-
-
Save iqwirty/9796498 to your computer and use it in GitHub Desktop.
My PowerShell profile init file
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
# | |
# %userprofile%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 | |
# | |
# | |
# Load some snap-ins | |
# | |
Add-PSSnapin Quest.ActiveRoles.ADManagement | |
# | |
# Configure some handy aliases | |
# | |
Set-Alias em "C:\emacs\bin\runemacs.exe" | |
Set-Alias mc "$Env:USERPROFILE\Downloads\Minecraft.exe" | |
Set-Alias np "$Env:windir\system32\notepad.exe" | |
Set-Alias pg "C:\Program Files\PowerGUI\ScriptEditor.exe" | |
Set-Alias ss "C:\Program Files\Microsoft Visual SourceSafe\ssexp.exe" | |
Set-Alias st "C:\Program Files\Sublime Text 2\sublime_text.exe" | |
Set-Alias vs2010 "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" | |
Set-Alias vs2012 "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" | |
# | |
# Define some handy functions | |
# | |
# | |
# A function to allow launching a Google search from the PowerShell | |
# command line. | |
# | |
Function Ok-Google | |
{ | |
param( | |
[Parameter(ValueFromPipeline=$true)] | |
[string]$query | |
) | |
Process | |
{ | |
Start "https://www.google.com/search?q=$query" | |
} | |
} | |
Function Go-Facebook | |
{ | |
Process { Start "https://www.facebook.com/home.php" } | |
} | |
Function Go-Drive | |
{ | |
Process { Start "https://drive.google.com" } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment