Thursday, June 14, 2012

Tips and Tricks in 3.0

Latest

From Scripting Guy 5 new tips and tricks

http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/20/my-five-favorite-powershell-3-0-tips-and-tricks.aspx

Create PowerShell profiles

http://msdn.microsoft.com/en-us/library/windows/desktop/bb613488(v=vs.85).aspx

help *  (man for linux)

New window popup
help get-service -showwindow  (v2 help get-process -online )

Auto build you commands
show-command get-wmiobject

Help can get updates
update-help (save-help)

Find the verbs
Get-verb

Find the verbs and count
Measure-object

If you have a conflict
microsoft.powershell.management\get-process

One Line is Magic
get-process | kill -whatif
get-process | kill -confirm

get-process [a-r]*[g-w] | kill -whatif

does it work well in a pipeline?
get-help get-service -full

PowerShell 3.0

Crash Course on V3 (awesome)
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/WSV321

Check out whats new in powershell 3.0
http://technet.microsoft.com/en-us/library/hh857339.aspx

Guides from Technet Library
http://technet.microsoft.com/en-us/library/bb978525.aspx