{"id":4484,"date":"2015-08-10T11:05:18","date_gmt":"2015-08-10T15:05:18","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=4484"},"modified":"2015-08-10T11:05:18","modified_gmt":"2015-08-10T15:05:18","slug":"an-improved-get-verb-command","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/","title":{"rendered":"An Improved Get-Verb Command"},"content":{"rendered":"<p>A recommended best practice for PowerShell scripting, especially when developing functions, is to follow the standard Verb-Noun naming convention. The Verb\u00a0 should be a value from the list of approved .NET verbs. The easy way to see that list is with the Get-Verb cmdlet. The result will also indicate the verb group or category like Security or Lifecycle. If you wanted to filter for a particular group you needed to use a Where-Object expression. It really isn't that difficult but I decided to make a my own version of Get-Verb that would let you specify one or more groups.<\/p>\n<pre class=\"lang:ps decode:true \" >#requires -version 4.0\r\n\r\n&lt;#\r\nThis is a copy of:\r\n\r\nCommandType Name     ModuleName\r\n----------- ----     ----------\r\nFunction    Get-Verb\r\n\r\nCreated: 8\/10\/2015\r\nAuthor : Jeff Hicks @JeffHicks\r\n\r\n  ****************************************************************\r\n  * DO NOT USE IN A PRODUCTION ENVIRONMENT UNTIL YOU HAVE TESTED *\r\n  * THOROUGHLY IN A LAB ENVIRONMENT. USE AT YOUR OWN RISK.  IF   *\r\n  * YOU DO NOT UNDERSTAND WHAT THIS SCRIPT DOES OR HOW IT WORKS, *\r\n  * DO NOT USE IT OUTSIDE OF A SECURE, TEST SETTING.             *\r\n  ****************************************************************\r\n#&gt;\r\n\r\n\r\nFunction Get-MyVerb {\r\n&lt;#\r\n\r\n.SYNOPSIS\r\nGets approved Windows PowerShell verbs.\r\n\r\n\r\n.DESCRIPTION\r\nThe Get-MyVerb function gets verbs that are approved for use in Windows PowerShell commands.  \r\n\r\nWindows PowerShell recommends that cmdlet and function names have the Verb-Noun format and include an approved verb. This practice makes command names more consistent and predictable, and easier to use, especially for users who do not speak English as a first language.  \r\n\r\nCommands that use unapproved verbs run in Windows PowerShell. However, when you import a module that includes a command with an unapproved verb in its name, the Import-Module command displays a warning message.\r\n\r\nThis command is a variation on Get-Verb that allows you to limit verbs to a category.\r\n\r\nNOTE:   The verb list that Get-MyVerb returns might not be complete. For an updated list of approved Windows PowerShell verbs with descriptions, see \"Cmdlet Verbs\" in MSDN at http:\/\/go.microsoft.com\/fwlink\/?LinkID=160773.\r\n\r\n.PARAMETER GROUP\r\nEach Windows PowerShell verb is assigned to one of the following groups. \r\n-- Common: Define generic actions that can apply to almost any cmdlet, such as Add.\r\n-- Communications:  Define actions that apply to communications, such as Connect.\r\n-- Data:  Define actions that apply to data handling, such as Backup.\r\n-- Diagnostic: Define actions that apply to diagnostics, such as Debug.\r\n-- Lifecycle: Define actions that apply to the lifecycle of a cmdlet, such as Complete.\r\n-- Security: Define actions that apply to security, such as Revoke.\r\n-- Other: Define other types of actions.\r\n\r\nThe default is everything.\r\n\r\n\r\n.EXAMPLE\r\n\r\nPS C:\\&gt; Get-MyVerb\r\nDescription\r\n-----------\r\nThis command gets all approved verbs.\r\n\r\n.EXAMPLE\r\n\r\nPS C:\\&gt; Get-MyVerb un*\r\n\r\nVerb                 Group\r\n----                 -----\r\nUndo                 Common\r\nUnlock               Common\r\nUnpublish            Data\r\nUninstall            Lifecycle\r\nUnregister           Lifecycle\r\nUnblock              Security\r\nUnprotect            Security\r\nDescription\r\n-----------\r\nThis command gets all approved verbs that begin with \"un\".\r\n\r\n.EXAMPLE\r\n\r\nPS C:\\&gt; Get-MyVerb -Group \"Security\"\r\n\r\nVerb                 Group\r\n----                 -----\r\nBlock                Security\r\nGrant                Security\r\nProtect              Security\r\nRevoke               Security\r\nUnblock              Security\r\nUnprotect            Security\r\n\r\nThis command gets all approved verbs in the Security group.\r\n\r\n.EXAMPLE\r\n\r\nPS C:\\&gt; get-command -module MyModule | where { (Get-MyVerb $_.Verb) -eq $null }\r\n\r\nThis command finds all commands in a module that have unapproved verbs.\r\n\r\n.EXAMPLE\r\n\r\nPS C:\\&gt; $approvedVerbs = Get-MyVerb | foreach {$_.verb}\r\n\r\nPS C:\\&gt; $myVerbs = get-command -module MyModule | foreach {$_.verb}\r\n\r\nPS C:\\&gt; ($myVerbs | foreach {$approvedVerbs -contains $_}) -contains $false\r\nTrue\r\n\r\nDoes MyModule export functions with unapproved verbs?\r\n\r\nPS C:\\&gt;  ($myverbs | where {$approvedVerbs -notcontains $_})\r\nForEach\r\nSort\r\nTee\r\nWhere\r\n\r\nThese commands detect unapproved verbs in a module and tell which unapproved verbs were detected in the module.\r\n\r\n.NOTES\r\n\r\nGet-MyVerb returns a modified version of a Microsoft.PowerShell.Commands.MemberDefinition object. The object does not have the standard properties of a MemberDefinition object. Instead it has Verb and Group properties. The Verb property contains a string with the verb name. The Group property contains a string with the verb group.\r\n\r\nWindows PowerShell verbs are assigned to a group based on their most common use. The groups are designed to make the verbs easy to find and compare, not to restrict their use. You can use any approved verb for any type of command.\r\n\r\nSome of the cmdlets that are installed with Windows PowerShell, such as Tee-Object and Where-Object, use unapproved verbs. These cmdlets are considered to be historic exceptions and their verbs are classified as \"reserved.\"\r\n\r\nLearn more about PowerShell:\r\n<blockquote class=\"wp-embedded-content\" data-secret=\"I9vaTljpJ0\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/essential-powershell-resources\/\">Essential PowerShell Learning Resources<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Essential PowerShell Learning Resources&#8221; &#8212; The Lonely Administrator\" src=\"https:\/\/jdhitsolutions.com\/blog\/essential-powershell-resources\/embed\/#?secret=03nK2SxukX#?secret=I9vaTljpJ0\" data-secret=\"I9vaTljpJ0\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\r\n\r\n.INPUTS\r\nString\r\n\r\n.OUTPUTS\r\n\r\nSelected.Microsoft.PowerShell.Commands.MemberDefinition\r\n\r\n.LINK\r\nGet-Verb\r\nImport-Module\r\n\r\n.LINK\r\nhttps:\/\/msdn.microsoft.com\/en-us\/library\/ms714428%28VS.85%29.aspx\r\n\r\n#&gt;\r\n[CmdletBinding()]\r\nParam(\r\n\r\n    [Parameter(Position=0, ValueFromPipeline=$true)]\r\n    [string[]]$Verb,\r\n    [ValidateSet(\"Common\",\"Communications\",\"Data\",\"Diagnostic\",\"LifeCycle\",\"Security\",\"Other\")]\r\n    [string[]]$Group\r\n)\r\n\r\nBegin {\r\n\r\n    Write-Verbose \"Starting $($MyInvocation.Mycommand)\"\r\n    Write-Verbose \"Using parameter set $($PSCmdlet.ParameterSetName)\"\r\n    \r\n} #begin\r\n\r\nProcess {\r\n\r\n    #remove Group from PSBoundParameters because Get-Verb won't recognize it.\r\n    if ($Group) {\r\n        $PSBoundParameters.Remove(\"Group\") | Out-Null\r\n        Write-Verbose \"Filtering by group: $($group -join '|')\"\r\n    }\r\n    Write-Verbose \"PSBoundParameters: $($PSBoundParameters | out-string)\"\r\n    Get-Verb @PSBoundParameters  | where {$_.group -match ($Group -join \"|\")}\r\n   \r\n\r\n} #process\r\n\r\nEnd {\r\n   \r\n    Write-Verbose \"Ending $($MyInvocation.Mycommand)\"\r\n\r\n} #end\r\n\r\n} #end function Get-MyVerb<\/pre>\n<p>The function is essentially a wrapper for Get-Verb. It uses the same parameters plus my addition. The help is also from Get-Verb, although I modified it slightly to reflect my version of the command. You can use Get-MyVerb as you would Get-Verb or you can specify one or more groups.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb-1024x703.png\" alt=\"get-myverb\" width=\"474\" height=\"325\" class=\"aligncenter size-large wp-image-4485\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb-1024x703.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb-300x206.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb.png 1252w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<p>The last improvement, is that if you run help for Get-MyVerb with -Online you'll get the MSDN documentation about .NET verbs which goes into detail. I think you will find it helpful.<\/p>\n<p>Enjoy and as always, comments or questions are welcome.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A recommended best practice for PowerShell scripting, especially when developing functions, is to follow the standard Verb-Noun naming convention. The Verb\u00a0 should be a value from the list of approved .NET verbs. The easy way to see that list is with the Get-Verb cmdlet. The result will also indicate the verb group or category like&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","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":"New from the blog: An Improved Get-Verb Command #PowerShell","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[60,4,8],"tags":[534,540],"class_list":["post-4484","post","type-post","status-publish","format-standard","hentry","category-best-practices","category-powershell","category-scripting","tag-powershell","tag-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>An Improved Get-Verb Command &#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\/4484\/an-improved-get-verb-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An Improved Get-Verb Command &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"A recommended best practice for PowerShell scripting, especially when developing functions, is to follow the standard Verb-Noun naming convention. The Verb\u00a0 should be a value from the list of approved .NET verbs. The easy way to see that list is with the Get-Verb cmdlet. The result will also indicate the verb group or category like...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-10T15:05:18+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb-1024x703.png\" \/>\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\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"An Improved Get-Verb Command\",\"datePublished\":\"2015-08-10T15:05:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/\"},\"wordCount\":196,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/get-myverb-1024x703.png\",\"keywords\":[\"PowerShell\",\"Scripting\"],\"articleSection\":[\"Best Practices\",\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/\",\"name\":\"An Improved Get-Verb Command &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/get-myverb-1024x703.png\",\"datePublished\":\"2015-08-10T15:05:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/get-myverb.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/08\\\/get-myverb.png\",\"width\":1252,\"height\":860},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4484\\\/an-improved-get-verb-command\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Best Practices\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/best-practices\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"An Improved Get-Verb Command\"}]},{\"@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":"An Improved Get-Verb Command &#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\/4484\/an-improved-get-verb-command\/","og_locale":"en_US","og_type":"article","og_title":"An Improved Get-Verb Command &#8226; The Lonely Administrator","og_description":"A recommended best practice for PowerShell scripting, especially when developing functions, is to follow the standard Verb-Noun naming convention. The Verb\u00a0 should be a value from the list of approved .NET verbs. The easy way to see that list is with the Get-Verb cmdlet. The result will also indicate the verb group or category like...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/","og_site_name":"The Lonely Administrator","article_published_time":"2015-08-10T15:05:18+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb-1024x703.png","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"An Improved Get-Verb Command","datePublished":"2015-08-10T15:05:18+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/"},"wordCount":196,"commentCount":1,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb-1024x703.png","keywords":["PowerShell","Scripting"],"articleSection":["Best Practices","PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/","name":"An Improved Get-Verb Command &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb-1024x703.png","datePublished":"2015-08-10T15:05:18+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/08\/get-myverb.png","width":1252,"height":860},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4484\/an-improved-get-verb-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Best Practices","item":"https:\/\/jdhitsolutions.com\/blog\/category\/best-practices\/"},{"@type":"ListItem","position":2,"name":"An Improved Get-Verb Command"}]},{"@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":2503,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2503\/friday-fun-test-powershell-command-name\/","url_meta":{"origin":4484,"position":0},"title":"Friday Fun &#8211; Test PowerShell Command Name","author":"Jeffery Hicks","date":"October 12, 2012","format":false,"excerpt":"Earlier this week I exchanged a few tweets with @jonhtyler about coming up with a proper name for a PowerShell function he was developing. The suggested best practice is to use the Verb-Noun naming convention, using an accepted verb. You can see the verbs with the Get-Verb cmdlet. So I\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":8693,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8693\/exporting-powershell-functions-to-files\/","url_meta":{"origin":4484,"position":1},"title":"Exporting PowerShell Functions to Files","author":"Jeffery Hicks","date":"December 3, 2021","format":false,"excerpt":"When I write a PowerShell module, it typically includes more than one export function. Where you store your module functions is a great discussion topic and I don't think there is necessarily one best practice for everyone. I think it might depend on the number and complexity of the functions.\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\/2021\/12\/export-function3.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/export-function3.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/export-function3.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/export-function3.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7648,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7648\/updated-powershell-tools\/","url_meta":{"origin":4484,"position":2},"title":"Updated PowerShell Tools","author":"Jeffery Hicks","date":"August 14, 2020","format":false,"excerpt":"I've released a new version of my popular PSScriptTools module, which you can install from the PowerShell Gallery. The module is collection of commands and tools that I use in my scripting and day-to-day work at a PowerShell console. Many of the commands run in Windows PowerShell and PowerShell 7,\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\/2020\/08\/get-myalias-2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/08\/get-myalias-2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/08\/get-myalias-2.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/08\/get-myalias-2.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/08\/get-myalias-2.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/08\/get-myalias-2.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":337,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/337\/summary-judgment\/","url_meta":{"origin":4484,"position":3},"title":"Summary Judgment","author":"Jeffery Hicks","date":"August 21, 2009","format":false,"excerpt":"While working on a new article for REDMOND magazine about PowerShell 2.0, I wanted to get some cmdlet information. I wanted an easy way to see a list of cmdlets for a given verb or noun. Of course that is easily done with Get-Command. However this only gives my the\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":2962,"url":"https:\/\/jdhitsolutions.com\/blog\/friday-fun\/2962\/friday-fun-powershell-commands-by-noun\/","url_meta":{"origin":4484,"position":4},"title":"Friday Fun PowerShell Commands by Noun","author":"Jeffery Hicks","date":"April 19, 2013","format":false,"excerpt":"One of PowerShell's greatest strength's is discoverability. Once you know how, it is very easy to discover what \u00a0you can do with PowerShell and how. One reason this works is because PowerShell commands follow a consistent verb-noun naming convention. With this in mind, you can see all of the commands\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"get-command-noun-01","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/get-command-noun-01-1024x577.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/get-command-noun-01-1024x577.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/get-command-noun-01-1024x577.png?resize=525%2C300 1.5x"},"classes":[]},{"id":8709,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8709\/converting-powershell-scripts-to-functions\/","url_meta":{"origin":4484,"position":5},"title":"Converting PowerShell Scripts to Functions","author":"Jeffery Hicks","date":"December 10, 2021","format":false,"excerpt":"Recently, I shared some PowerShell code to export a function to a file. It was a popular post. My friend Richard Hicks (no relation) thought we was joking when he asked about converting files to functions. His thought was to take a bunch of PowerShell scripts, turn them into a\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\/2021\/12\/poc-modulecommands.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/poc-modulecommands.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/poc-modulecommands.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/poc-modulecommands.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4484","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=4484"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4484\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}