{"id":5054,"date":"2012-08-30T00:01:00","date_gmt":"2012-08-30T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2012\/08\/30\/finding-your-way-with-powershell-cmdlets\/"},"modified":"2012-08-30T00:01:00","modified_gmt":"2012-08-30T00:01:00","slug":"finding-your-way-with-powershell-cmdlets","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/finding-your-way-with-powershell-cmdlets\/","title":{"rendered":"Finding Your Way with PowerShell Cmdlets"},"content":{"rendered":"<p><b>Summary<\/b>: Guest blogger, Jason Walker, discusses finding the right Windows PowerShell cmdlet for the job.<\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. Today is the preview for Jason Walker&rsquo;s presentation for <a href=\"http:\/\/www.powershellsaturday.com\/002\" target=\"_blank\">PowerShell Saturday #002<\/a> coming to Charlotte, NC on September 15, 2012.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2235.hsg-8-30-12-1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2235.hsg-8-30-12-1.png\" alt=\"Photo of Jason Walker\" title=\"Photo of Jason Walker\" \/><\/a><\/p>\n<p style=\"padding-left: 30px\">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.<\/p>\n<p style=\"padding-left: 30px\">Twitter: <a href=\"http:\/\/www.twitter.com\/#!AutomationJason\" target=\"_blank\">AutomationJason<\/a><\/p>\n<p>Take it away Jason&hellip;<\/p>\n<p>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&rsquo;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.<\/p>\n<p>These are some of the topics I will touch on to help you get past the beginner barrier for using Windows PowerShell.<\/p>\n<p><b>Q<\/b>: I know what I what to get done, but how do I know which cmdlet to use?<\/p>\n<p style=\"padding-left: 30px\"><b>A<\/b>: The use of <b>Get-Command<\/b> and a wildcard character is all you need. Let&rsquo;s say you are working with services. Here is how to get all the commands that work with services:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2627.hsg-8-30-12-2.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2627.hsg-8-30-12-2.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p><b>Q<\/b>: That&rsquo;s great, but I still don&rsquo;t know how to use them.<\/p>\n<p style=\"padding-left: 30px\"><b>A<\/b>: Don&rsquo;t sweat the small stuff. Use the <b>Get-Help<\/b> cmdlet with the <b>Examples<\/b> switch.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8637.image.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8637.image.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<\/p>\n<p>Check it out. Windows PowerShell doesn&rsquo;t only give you syntax that is hard to understand like other command-line utilities. It gives you practical examples. How cool is that!<\/p>\n<p><b>Q<\/b>: I&rsquo;ve been using Windows PowerShell for a while now, but there is much I still don&rsquo;t understand. I read on the Hey, Scripting Guy! Blog that I can get drive free space by running this command:<\/p>\n<p style=\"padding-left: 30px\">Get-WmiObject win32_logicaldisk -Filter &#8220;DriveType=3&#8221;<\/p>\n<p>I get the <b>Get-WmiObject<\/b> part, but what does &ldquo;DriveType=3&rdquo; mean?<\/p>\n<p style=\"padding-left: 30px\"><b>A<\/b>: The documentation that explains this is on MSDN. Go to www.Bing.com, and search for &ldquo;win32_logicaldisk msdn&rdquo;.<\/p>\n<p>I will show you how easily you can find it if you come to the Charlotte Windows PowerShell Saturday on September 15.<\/p>\n<p>~Jason<\/p>\n<p>Thank you, Jason, for sharing a sneak preview of your presentation. Join me tomorrow for a blog by June Blender.<\/p>\n<p>I invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><b>Ed Wilson, Microsoft Scripting Guy<\/b>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&rsquo;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 [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[51,56,338,3,4,45],"class_list":["post-5054","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-getting-started","tag-guest-blogger","tag-jason-walker","tag-scripting-guy","tag-scripting-techniques","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>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&rsquo;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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/5054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=5054"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/5054\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=5054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=5054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=5054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}