Managing and troubleshooting Windows Clients and Servers is what Powershell is all about. And, the quickest way to get started is by learning a few simple Powershell cmdlets. Powershell cmdlets are short one-line commands that are specifically designed to help IT Professionals with their day to day tasks. There are a only a handful of cmdlets in a default installation of Powershell 1.0 (more can be added by installing additional cmdlet providers). To find out which cmdlets ship in Powershell 1.0, simply type “get-command” into your Powershell command prompt. Then, you can use “get-help” to learn more about each individual cmdlet. There! Now you know your first two cmdlets! You’re off and running.
If you have been to one of my TechNet Events lately, you’ve seen some cmdlets in action. Some examples of what Powershell cmdlets can do include:
- List the hotfixes on the local or remote computer.
- Browse the registry hive in a command prompt interface.
- Find your BIOS version, CPU speed (as well as current clock speed), and physical memory information.
- Find ALL of the scheduled tasks that run on Windows, including the ones that are hidden in the GUI.
- Install a software package on a Remote Machine. (BTW, modify the cmdlet into a slightly more advanced Powershell script file, and you could automate software installation on 1000’s of machines at once.)
- Query free disk space from local or remote machines.
- Query Network Adapter details from local or remote machines.
- MUCH, MUCH more.
To start using the attached sample cmdlets:
- Install Powershell 1.0
- Download and extract PowershellSampleCmdlets.zip.
- Copy and paste any of the non-commented lines (i.e. any line without a “#” in front of it) into your Powershell command prompt.
- Watch the results!
Be careful! Some of the cmdlets may do things you do not want, like stop necessary services, so run them at your own risk. To mitigate the risk, the dangerous cmdlets have -confirm switches, so you will be prompted before any bad stuff happens, but that’s all the warning you’ll get.