This Friday (04/12/13), I am leading an hour long Lunch & Learn session going over the basics of PowerShell. A question I consistently see is, “I am new to PowerShell. What do I need to first?” Here are the two first things you should do:
Update Your Help
PowerShell cmdlets have awesome help files that are filled with examples, syntax directions, and much more! In PowerShell 3, you have to do a little work to get all of this awesomeness. And by little, I mean a single command.
Your first step when opening PowerShell for the first time should be to type Update-Help. Microsoft made the wise decision to not include detailed help commands that are outdated after shipping. By allowing the help files to be updated after shipping, you can always have the latest files.
As a note, you may receive an error (like the one above) when updating help. If you do, open PowerShell as an Administrator and run Update-Help again.
Want to take this further? Create a scheduled task on your computer that updates your help automatically! The program/command for your task should be %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command update-help
Be sure to run the task with administrative privileges.
Try this at a PowerShell prompt: dir
Pretty cool right! PowerShell took your dir command and executed the cmdlet Get-ChildItem. This is because Get-ChildItem has an alias named dir. Not only is dir faster to type but it is a near universal command. Knowing that habits die hard, a lot of traditional commands have an alias in PowerShell.
You can see a list of all alias in PowerShell by typing Get-Alias. Go ahead and scroll through that list. Recognize any other commands?
If you are new to PowerShell, have these two steps helped you? If you are a PowerShell guru, what other tips do you have for first use?