Skip to content

Instantly share code, notes, and snippets.

View rpalo's full-sized avatar

Ryan Palo rpalo

View GitHub Profile
PS> $profile | Get-Member -type NoteProperty
# Microsoft.PowerShell_profile.ps1
# You can customize the window itself by accessing $Host.UI.RawUI
$window = $Host.UI.RawUI
$window.WindowTitle = "Pa-pa-pa-pa-pa-pa-POWERSHELL"
$window.BackgroundColor = "Black"
$window.ForegroundColor = "Gray"
# You can define functions (remember to follow the Verb-Noun convention!)
function Count-History {
# Use whichever editor you love best
PS> code $profile
PS> Test-Path $profile
PS> (Get-Process)[0] | Get-TypeData
PS> Get-Command -verb new
PS> Get-Process | Get-Member
# Another similar command that also prints out the values is:
PS> (Get-Process)[0] | Format-List
$ ls -l
PS> Get-ChildItem
PS> Get-ChildItem
# You can also do:
PS> gci
PS> dir
# And, just to make you feel a little more at home...
PS> ls