Finding Your Way with PowerShell Cmdlets
Summary: Guest blogger, Jason Walker, discusses finding the right Windows PowerShell cmdlet for the job.
Microsoft Scripting Guy, Ed Wilson, is here. Today is the preview for Jason Walker’s presentation for PowerShell Saturday #002 coming to Charlotte, NC on September 15, 2012.
Jason is a Microsoft premier field engineer and Windows PowerShell evangelist. He supports customers in the public sector. He has expertise in Exchange Server, security, and Windows PowerShell. Jason has been a featured guest blogger on the Hey, Scripting Guy! Blog, and he maintains his personal blog.
Take it away Jason…
Many IT admins have been staying away from Windows PowerShell. Maybe they find the command line to be intimidating. They like to work within the GUI because one can easily figure out what to do because it’s discoverable. Little do they know little time is needed to master the skills to make Windows PowerShell discoverable. Windows PowerShell is so awesome that it has the ability to teach you how to use it.
These are some of the topics I will touch on to help you get past the beginner barrier for using Windows PowerShell.
Q: I know what I what to get done, but how do I know which cmdlet to use?
A: The use of Get-Command and a wildcard character is all you need. Let’s say you are working with services. Here is how to get all the commands that work with services:
Q: That’s great, but I still don’t know how to use them.
A: Don’t sweat the small stuff. Use the Get-Help cmdlet with the Examples switch.
Check it out. Windows PowerShell doesn’t only give you syntax that is hard to understand like other command-line utilities. It gives you practical examples. How cool is that!
Q: I’ve been using Windows PowerShell for a while now, but there is much I still don’t understand. I read on the Hey, Scripting Guy! Blog that I can get drive free space by running this command:
Get-WmiObject win32_logicaldisk -Filter “DriveType=3”
I get the Get-WmiObject part, but what does “DriveType=3” mean?
A: The documentation that explains this is on MSDN. Go to www.Bing.com, and search for “win32_logicaldisk msdn”.
I will show you how easily you can find it if you come to the Charlotte Windows PowerShell Saturday on September 15.
Thank you, Jason, for sharing a sneak preview of your presentation. Join me tomorrow for a blog by June Blender.
I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at email@example.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.
Ed Wilson, Microsoft Scripting Guy