{"id":4018,"date":"2014-09-15T11:02:47","date_gmt":"2014-09-15T15:02:47","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=4018"},"modified":"2014-09-11T10:12:11","modified_gmt":"2014-09-11T14:12:11","slug":"more-powershell-toolmaking-fun","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/","title":{"rendered":"More PowerShell Toolmaking Fun"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/blacksmith.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-4019\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/blacksmith.png\" alt=\"blacksmith\" width=\"171\" height=\"286\" \/><\/a> I am having so much fun making my own PowerShell tools that I just can't stop. I've been using my Get-Commandmetadata function that <a title=\"Friday Fun: Creating PowerShell Scripts with PowerShell\" href=\"http:\/\/jdhitsolutions.com\/blog\/2014\/09\/friday-fun-creating-powershell-scripts-with-powershell\/\" target=\"_blank\">I wrote about<\/a> a few weeks ago. A driving force in all of this is to have a toolset that I can use efficiently from the console. Or to put it in terms you might appreciate: the biggest bang for the least amount of typing. Today, I have another example. I took a common PowerShell expression and simplified it into its own command. And even though the final code looks like a lot, it didn't take me very long because my toolmaking tool \"wrote\" most of the script for me.<\/p>\n<p>So the common task is finding services that match a certain state such as running or stopped. You've most likely seen this expression:<\/p>\n<pre class=\"lang:ps decode:true \">get-service -computername server01 | where {$_.status -eq 'running'}<\/pre>\n<p>Not the most onerous command to type, but even I have mistyped and had to correct. If this is a common task, why not create an easy to use tool?<\/p>\n<pre class=\"lang:ps decode:true \">#requires -version 3.0\r\n\r\nFunction Get-MyService {\r\n &lt;# \r\n .Synopsis\r\n Get services by status.\r\n .Description\r\n This is a proxy version of Get-Service. The only real change is that you can specify services by their status. The default is to get all running services.\r\n .Notes\r\n Created:\t9\/11\/2014 \r\n\r\n Learn more:\r\n  PowerShell in Depth: An Administrator's Guide (http:\/\/www.manning.com\/jones6\/)\r\n  PowerShell Deep Dives (http:\/\/manning.com\/hicks\/)\r\n  Learn PowerShell 3 in a Month of Lunches (http:\/\/manning.com\/jones3\/)\r\n  Learn PowerShell Toolmaking in a Month of Lunches (http:\/\/manning.com\/jones4\/)\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 \r\n .Example\r\n PS C:\\&gt; Get-MyService b* -status stopped -comp chi-dc04\r\n\r\nStatus   Name               DisplayName                           \r\n------   ----               -----------                           \r\nStopped  BITS               Background Intelligent Transfer Ser...\r\n \r\n .Link\r\n Get-Service\r\n \r\n #&gt;\r\n\r\n[CmdletBinding(DefaultParameterSetName='Default', RemotingCapability='SupportedByCommand')]\r\n param(\r\n     [Parameter(ParameterSetName='Default', Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)]\r\n     [Alias('ServiceName')]\r\n     [string[]]$Name, \r\n     [ValidateNotNullorEmpty()]\r\n     [System.ServiceProcess.ServiceControllerStatus]$Status=\"Running\",\r\n     [Parameter(ValueFromPipelineByPropertyName=$true)]\r\n     [Alias('Cn')]\r\n     [ValidateNotNullOrEmpty()]\r\n     [string[]]$ComputerName = $env:COMPUTERNAME, \r\n     [Alias('DS')]\r\n     [switch]$DependentServices, \r\n     [Alias('SDO','ServicesDependedOn')]\r\n     [switch]$RequiredServices, \r\n     [Parameter(ParameterSetName='DisplayName', Mandatory=$true)]\r\n     [string[]]$DisplayName, \r\n     [ValidateNotNullOrEmpty()]\r\n     [string[]]$Include, \r\n     [ValidateNotNullOrEmpty()]\r\n     [string[]]$Exclude, \r\n     [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)]\r\n     [ValidateNotNullOrEmpty()]\r\n     [System.ServiceProcess.ServiceController[]]$InputObject\r\n  ) \r\n  \r\n begin {\r\n \r\n     Write-Verbose -Message \"Starting $($MyInvocation.Mycommand)\"  \r\n\r\n     Write-Verbose \"Getting services with a status of $status on $($Computername.toUpper())\"\r\n \r\n     try {\r\n         $outBuffer = $null\r\n         if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))\r\n         {\r\n             $PSBoundParameters['OutBuffer'] = 1\r\n         }\r\n\r\n         #remove Status parameter from bound parameters since Get-Service won't recognize it\r\n         $PSBoundParameters.Remove(\"Status\") | Out-Null\r\n\r\n         $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Get-Service', [System.Management.Automation.CommandTypes]::Cmdlet)\r\n         #$scriptCmd = {&amp; $wrappedCmd @PSBoundParameters }\r\n         #my modified command \r\n         $scriptCmd = {&amp; $wrappedCmd @PSBoundParameters | Where-Object {$_.status -eq $Status } }\r\n         $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)\r\n         $steppablePipeline.Begin($PSCmdlet)\r\n     } catch {\r\n         throw\r\n     }\r\n } #begin\r\n \r\n process  {\r\n     try {\r\n         $steppablePipeline.Process($_)\r\n     } catch {\r\n         throw\r\n     }\r\n } #process\r\n \r\n end {\r\n     try {\r\n         $steppablePipeline.End()\r\n     } catch {\r\n         throw\r\n     }\r\n     Write-Verbose -Message \"Ending $($MyInvocation.Mycommand)\" \r\n } #end\r\n  \r\n} #end function Get-MyService\r\n\r\nset-alias -Name gsv2 -Value Get-MyService<\/pre>\n<p>Yes, I could have written my own function that called Get-Service, but then I'd have to write all of the code to accommodate all of the parameters for Get-Service. With the proxy command, all I need to do is insert my own code.<\/p>\n<pre class=\"lang:ps decode:true \">#my modified command \r\n$scriptCmd = {&amp; $wrappedCmd @PSBoundParameters | Where-Object {$_.status -eq $Status } }<\/pre>\n<p>In other words, I let Get-Service do its thing and then filter the result. Now I can easily do this:<\/p>\n<pre class=\"striped:false nums-toggle:false lang:batch decode:true \">PS C:\\Scripts&gt; get-myservice w* -Status stopped -ComputerName chi-dc01\r\n\r\nStatus   Name               DisplayName                           \r\n------   ----               -----------                           \r\nStopped  wbengine           Block Level Backup Engine Service     \r\nStopped  WbioSrvc           Windows Biometric Service             \r\nStopped  WcsPlugInService   Windows Color System                  \r\nStopped  WdiServiceHost     Diagnostic Service Host               \r\nStopped  WdiSystemHost      Diagnostic System Host                \r\nStopped  Wecsvc             Windows Event Collector               \r\nStopped  WinHttpAutoProx... WinHTTP Web Proxy Auto-Discovery Se...\r\nStopped  wmiApSrv           WMI Performance Adapter               \r\nStopped  wudfsvc            Windows Driver Foundation - User-mo...<\/pre>\n<p>Or, because I'm typing this, I could use my own alias.<\/p>\n<p>One thing I want to point out, is that for the new Status property, you'll notice I didn't cast it as a string.<\/p>\n<pre class=\"lang:ps decode:true \">[System.ServiceProcess.ServiceControllerStatus]$Status=\"Running\"<\/pre>\n<p>I could have made it a string, but by using the actual enumeration, PowerShell will autocomplete possible values.<br \/>\n<a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/get-myservice.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4022\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/get-myservice-1024x374.png\" alt=\"get-myservice\" width=\"474\" height=\"173\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/get-myservice-1024x374.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/get-myservice-300x109.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/get-myservice.png 1500w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<p>How did I know what to use? I used Get-Member.<\/p>\n<pre class=\"striped:false nums-toggle:false lang:batch decode:true\">PS C:\\Scripts&gt; get-service bits | get-member status\r\n\r\n   TypeName: System.ServiceProcess.ServiceController\r\n\r\nName   MemberType Definition                                                 \r\n----   ---------- ----------                                                 \r\nStatus Property   System.ServiceProcess.ServiceControllerStatus Status {get;}<\/pre>\n<p>It is really not that difficult or time consuming. I spent more time writing this blog post than I spent creating the function.<\/p>\n<p>I hope this will inspire you to create your own PowerShell tools and that you will share the fruits of your labors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am having so much fun making my own PowerShell tools that I just can&#8217;t stop. I&#8217;ve been using my Get-Commandmetadata function that I wrote about a few weeks ago. A driving force in all of this is to have a toolset that I can use efficiently from the console. Or to put it in&#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: More #PowerShell Toolmaking Fun http:\/\/bit.ly\/1lXOVxQ","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":[4,8],"tags":[534,475,540],"class_list":["post-4018","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","tag-powershell","tag-proxy-function","tag-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>More PowerShell Toolmaking Fun &#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\/4018\/more-powershell-toolmaking-fun\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"More PowerShell Toolmaking Fun &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"I am having so much fun making my own PowerShell tools that I just can&#039;t stop. I&#039;ve been using my Get-Commandmetadata function that I wrote about a few weeks ago. A driving force in all of this is to have a toolset that I can use efficiently from the console. Or to put it in...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2014-09-15T15:02:47+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/blacksmith.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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"More PowerShell Toolmaking Fun\",\"datePublished\":\"2014-09-15T15:02:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/\"},\"wordCount\":348,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/blacksmith.png\",\"keywords\":[\"PowerShell\",\"Proxy function\",\"Scripting\"],\"articleSection\":[\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/\",\"name\":\"More PowerShell Toolmaking Fun &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/blacksmith.png\",\"datePublished\":\"2014-09-15T15:02:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/#primaryimage\",\"url\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/blacksmith.png\",\"contentUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/blacksmith.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4018\\\/more-powershell-toolmaking-fun\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"More PowerShell Toolmaking Fun\"}]},{\"@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":"More PowerShell Toolmaking Fun &#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\/4018\/more-powershell-toolmaking-fun\/","og_locale":"en_US","og_type":"article","og_title":"More PowerShell Toolmaking Fun &#8226; The Lonely Administrator","og_description":"I am having so much fun making my own PowerShell tools that I just can't stop. I've been using my Get-Commandmetadata function that I wrote about a few weeks ago. A driving force in all of this is to have a toolset that I can use efficiently from the console. Or to put it in...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/","og_site_name":"The Lonely Administrator","article_published_time":"2014-09-15T15:02:47+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/blacksmith.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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"More PowerShell Toolmaking Fun","datePublished":"2014-09-15T15:02:47+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/"},"wordCount":348,"commentCount":3,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/blacksmith.png","keywords":["PowerShell","Proxy function","Scripting"],"articleSection":["PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/","name":"More PowerShell Toolmaking Fun &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/blacksmith.png","datePublished":"2014-09-15T15:02:47+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/#primaryimage","url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/blacksmith.png","contentUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/blacksmith.png"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"More PowerShell Toolmaking Fun"}]},{"@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":9389,"url":"https:\/\/jdhitsolutions.com\/blog\/books\/9389\/powershell-scripting-and-toolmaking\/","url_meta":{"origin":4018,"position":0},"title":"PowerShell Scripting and Toolmaking","author":"Jeffery Hicks","date":"May 24, 2024","format":false,"excerpt":"Several years ago Don Jones and I wrote what we hoped would be the definitive book on PowerShell scripting and toolmaking. The book takes all off our years of experience, not only from writing PowerShell code, to teaching and conference presentations where we hear first hand what people struggle with.\u2026","rel":"","context":"In &quot;Books&quot;","block_context":{"text":"Books","link":"https:\/\/jdhitsolutions.com\/blog\/category\/books\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4966,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4966\/powershell-toolmaking-dos-and-donts\/","url_meta":{"origin":4018,"position":1},"title":"PowerShell Toolmaking Dos and Don&#8217;ts","author":"Jeffery Hicks","date":"May 2, 2016","format":false,"excerpt":"During the last Microsoft MVP Summit, Channel 9 invited MVPs into their studios to record short presentations on anything they wanted. This was too good a deal to pass on, so my friend Greg Shields and I jumped into the studio to talk about PowerShell Toolmaking. To be more accurate,\u2026","rel":"","context":"In &quot;MVP&quot;","block_context":{"text":"MVP","link":"https:\/\/jdhitsolutions.com\/blog\/category\/mvp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3117,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3117\/msdevwny-powershell-advanced-functions\/","url_meta":{"origin":4018,"position":2},"title":"MSDevWNY PowerShell Advanced Functions","author":"Jeffery Hicks","date":"June 20, 2013","format":false,"excerpt":"Last night I presented for the MSDevWNY user group in the Buffalo, NY area. They were an interested and enthusiastic audience and I think we could have spent another few hours talking about PowerShell. My presentation was one I've given before on Advanced PowerShell functions. I promised the group a\u2026","rel":"","context":"In &quot;Best Practices&quot;","block_context":{"text":"Best Practices","link":"https:\/\/jdhitsolutions.com\/blog\/category\/best-practices\/"},"img":{"alt_text":"talkbubble-v3","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/talkbubble-v3-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":5462,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5462\/powershell-scripting-and-toolmaking-the-last-book-you-will-ever-need\/","url_meta":{"origin":4018,"position":3},"title":"PowerShell Scripting and Toolmaking &#8211; The Last Book You Will Ever Need","author":"Jeffery Hicks","date":"March 9, 2017","format":false,"excerpt":"At long last it is finished! Don Jones and I have recently published the first iteration of\u00a0 The PowerShell Scripting and Toolmaking Book. This project was first announced in January 2017 with an early release program.\u00a0\u00a0 The first edition was finished and in reader's hands by the end of February\u2026","rel":"","context":"In &quot;Books&quot;","block_context":{"text":"Books","link":"https:\/\/jdhitsolutions.com\/blog\/category\/books\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/pstoolmaking-thumbnail.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":6348,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6348\/building-more-powershell-functions\/","url_meta":{"origin":4018,"position":4},"title":"Building More PowerShell Functions","author":"Jeffery Hicks","date":"January 3, 2019","format":false,"excerpt":"In a recent post I discussed the the process you might go through in developing a PowerShell function. By the end, I not only had a new tool for my PowerShell toolbox, but I had a function outline that I could re-use. If you read the previous article then you\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\/01\/image_thumb-3.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-3.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-3.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-3.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":6612,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6612\/more-fun-with-docker-containers-and-powershell\/","url_meta":{"origin":4018,"position":5},"title":"More Fun with Docker Containers and PowerShell","author":"Jeffery Hicks","date":"March 29, 2019","format":false,"excerpt":"A few days ago I shared some experiences of working with Docker containers and PowerShell. As I continue to learn Docker, I am also learning how to manage it with PowerShell. The Docker command line tools are fine but I think they are even better when drizzled with a nice\u2026","rel":"","context":"In &quot;Docker&quot;","block_context":{"text":"Docker","link":"https:\/\/jdhitsolutions.com\/blog\/category\/docker\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/image_thumb-20.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/image_thumb-20.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/image_thumb-20.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/image_thumb-20.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4018","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=4018"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4018\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}