{"id":87,"date":"2007-01-15T22:14:00","date_gmt":"2007-01-16T02:14:00","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/2007\/01\/15\/powershell-help-examples\/"},"modified":"2009-08-05T13:06:34","modified_gmt":"2009-08-05T17:06:34","slug":"powershell-help-examples","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/","title":{"rendered":"Powershell Help Examples"},"content":{"rendered":"<p><span style=\"font-family:verdana;\"><span style=\"font-size:100%;\">It may seem like a little thing, but the Get-Help cmdlet in PowerShell has some features you may not be aware of.  I'm always using the -full parameter to see all the help information, primarily so I can see the examples. Well Get-Help has a -examples switch which won't display syntax help, but it will show you all the examples from the help file. Try these commands to see for yourself<\/p>\n<p>help get-wmiobject -examples<br \/>help get-process -examples<br \/><\/span><\/span><br \/>Technorati Tags:<br \/><a href=\"http:\/\/www.technorati.com\/tags\/powershell\" rel=\"tag\">PowerShell<\/a>   <a href=\"http:\/\/www.technoratic.com\/tags\/scripting\" rel=\"tag\">Scripting<\/a><br \/><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It may seem like a little thing, but the Get-Help cmdlet in PowerShell has some features you may not be aware of. I&#8217;m always using the -full parameter to see all the help information, primarily so I can see the examples. Well Get-Help has a -examples switch which won&#8217;t display syntax help, but it will&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,8],"tags":[28],"class_list":["post-87","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","tag-cmdlet"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Powershell Help Examples &#8226; The Lonely Administrator<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Powershell Help Examples &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"It may seem like a little thing, but the Get-Help cmdlet in PowerShell has some features you may not be aware of. I&#039;m always using the -full parameter to see all the help information, primarily so I can see the examples. Well Get-Help has a -examples switch which won&#039;t display syntax help, but it will...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2007-01-16T02:14:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2009-08-05T17:06:34+00:00\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/87\\\/powershell-help-examples\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/87\\\/powershell-help-examples\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Powershell Help Examples\",\"datePublished\":\"2007-01-16T02:14:00+00:00\",\"dateModified\":\"2009-08-05T17:06:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/87\\\/powershell-help-examples\\\/\"},\"wordCount\":85,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"keywords\":[\"cmdlet\"],\"articleSection\":[\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/87\\\/powershell-help-examples\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/87\\\/powershell-help-examples\\\/\",\"name\":\"Powershell Help Examples &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2007-01-16T02:14:00+00:00\",\"dateModified\":\"2009-08-05T17:06:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/87\\\/powershell-help-examples\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/87\\\/powershell-help-examples\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/87\\\/powershell-help-examples\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Powershell Help Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Powershell Help Examples &#8226; The Lonely Administrator","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/","og_locale":"en_US","og_type":"article","og_title":"Powershell Help Examples &#8226; The Lonely Administrator","og_description":"It may seem like a little thing, but the Get-Help cmdlet in PowerShell has some features you may not be aware of. I'm always using the -full parameter to see all the help information, primarily so I can see the examples. Well Get-Help has a -examples switch which won't display syntax help, but it will...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/","og_site_name":"The Lonely Administrator","article_published_time":"2007-01-16T02:14:00+00:00","article_modified_time":"2009-08-05T17:06:34+00:00","author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Powershell Help Examples","datePublished":"2007-01-16T02:14:00+00:00","dateModified":"2009-08-05T17:06:34+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/"},"wordCount":85,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"keywords":["cmdlet"],"articleSection":["PowerShell","Scripting"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/","name":"Powershell Help Examples &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"datePublished":"2007-01-16T02:14:00+00:00","dateModified":"2009-08-05T17:06:34+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/87\/powershell-help-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Powershell Help Examples"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":579,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/579\/powershell-picasso\/","url_meta":{"origin":87,"position":0},"title":"PowerShell Picasso","author":"Jeffery Hicks","date":"February 23, 2010","format":false,"excerpt":"You have probably heard the story (or legend) about Pablo Picasso and his napkin drawing. A guy goes up to Picasso in a cafe and asks for an autograph or something. Picasso sketches out something in a minute or so. He turns to the guy and says, \u201cThat will be\u2026","rel":"","context":"In &quot;PowerShell v2.0&quot;","block_context":{"text":"PowerShell v2.0","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-v2-0\/"},"img":{"alt_text":"powershell--picasso","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/02\/powershellpicasso_thumb.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4529,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4529\/whats-the-weather\/","url_meta":{"origin":87,"position":1},"title":"What\u2019s the Weather?","author":"Jeffery Hicks","date":"September 23, 2015","format":false,"excerpt":"I have used a PowerShell module I wrote a while ago to retrieve weather information from Yahoo.com. Yahoo offers a set of web APIs which are free to use, that will provide weather information for a given location. The location is determined by a \"Where On Earth ID\", or woeid.\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"clouds","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/092315_1158_WhatstheWea1.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":88,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/88\/powershell-parsing\/","url_meta":{"origin":87,"position":2},"title":"Powershell Parsing","author":"Jeffery Hicks","date":"January 16, 2007","format":false,"excerpt":"In PowerShell, Get-WMIObject is a terrific cmdlet for remotely managing systems. If you have a text list of server or computer names, here's a quick method you could enumerate that list and do something to each server.foreach ($server in (Get-Content s:\\servers.txt)) {#skip blank lines if (($server).length -gt 0) { $server\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7065,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7065\/powershell-paths-and-errors\/","url_meta":{"origin":87,"position":3},"title":"PowerShell Paths and Errors","author":"Jeffery Hicks","date":"December 6, 2019","format":false,"excerpt":"As you write PowerShell scripts, it is important that you include error handling. Most of the time, this involves the use of Try\/Catch statements. The tricky thing with Try\/Catch is that you can only catch a terminating exception. There are a few cmdlets that by design will throw a terminating\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-13.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-13.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-13.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-13.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":3909,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3909\/so-you-need-to-write-a-powershell-script\/","url_meta":{"origin":87,"position":4},"title":"So you need to write a PowerShell script","author":"Jeffery Hicks","date":"July 7, 2014","format":false,"excerpt":"So...you have decided to write a PowerShell script or have at least identified a need. What do you do first? If you say \"Google or Bing\", I'd say you are wrong. In my opinion, when you are developing a PowerShell script, searching for an existing script is not the first\u2026","rel":"","context":"In &quot;Best Practices&quot;","block_context":{"text":"Best Practices","link":"https:\/\/jdhitsolutions.com\/blog\/category\/best-practices\/"},"img":{"alt_text":"lightbulb-idea","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/lightbulb-idea-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":35,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/35\/printing-from-powershell\/","url_meta":{"origin":87,"position":5},"title":"Printing from PowerShell","author":"Jeffery Hicks","date":"June 6, 2006","format":false,"excerpt":"PowerShell has a slick feature that allows you to send the output from a cmdlet or expression directly to a printer. Pipe the output to the Out-Printer cmdlet and it will print out on the default printer:get-process | out-printer If you have other printers installed you can use the printer\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/87","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=87"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/87\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}