In This Chapter
Using Get-Help to get help
Getting familiar with your objects using Get-Member
Using Set-Location to navigate
Reading text files with Get-Content
Writing to a file by using Out-File
Leveraging WMI by using Get-WMIObject
Using New-Object to create new objects
Getting picky with Select-Object
Going through collections with Foreach-Object
Using Where-Object to control the pipeline
Windows PowerShell 2 contains several hundred Cmdlets. All of them are important in one way or the other, so it's hard to pick just ten of them that you'll need the most. I base this chapter on the Cmdlets I feel are the most important based on their utility.
In a command line–driven environment, you don't get the luxury of being able to simply click menus and buttons or to go through dialog boxes in the hope of finding the option or setting you need to do whatever it is you want to do. Instead, you must know not only the command you want to run, but also what parameters it needs and all the other information related to the command.
Get-Help Cmdlet is your best friend because it helps you find out all the information you need about any particular Cmdlet. It makes command help available at your fingertips any time. You don't need to go online or open any reference help files.
Get-Help gets you minimal or detailed information on Cmdlets — and, more important, shows you examples of how to run them because often, the parameters start ...