{"id":5499,"date":"2017-03-13T10:58:12","date_gmt":"2017-03-13T14:58:12","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=5499"},"modified":"2017-03-13T10:58:12","modified_gmt":"2017-03-13T14:58:12","slug":"more-fun-with-vscode-snippets","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/","title":{"rendered":"More Fun with VSCode Snippets"},"content":{"rendered":"<p>A few days ago <a href=\"http:\/\/jdhitsolutions.com\/blog\/scripting\/5488\/adding-powershell-snippets-to-visual-studio-code\/\" target=\"_blank\">I posted an entry<\/a> that explained how to create and use snippets in Visual Studio Code. As mentioned in that article I'm attempting to make the transition to VSCode for all my PowerShell work. Being able to use snippets is just one feature that I rely on. And as a number of people pointed out, there are VSCode extensions that will make this easy to do. Install the Easy Snippet Maker extension and you'll get a context menu to turn any selected text into a snippet.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image_thumb-10.png\" alt=\"image\" width=\"455\" height=\"423\" border=\"0\" \/><\/a><\/p>\n<p>Follow the prompts and if creating a PowerShell snippet it will be added to the PowerShell.json file I showed previously. But there's more you can do with snippets, even after you've created them. This is fun.<\/p>\n<p><!--more--><\/p>\n<p>I created a function outline:<\/p>\n<pre class=\"lang:ps mark:0 decode:true \">Function Name {\r\n    [cmdletbinding()]\r\n    Param(\r\n        [Parameter(ValueFromPipeline)]\r\n        [objecttype]$Variable\r\n    )\r\n    Begin {\r\n        Write-Verbose \"[$((Get-Date).TimeofDay) BEGIN  ] Starting $($myinvocation.mycommand)\"\r\n\r\n    } #begin\r\n\r\n    Process {\r\n        Write-Verbose \"[$((Get-Date).TimeofDay) PROCESS] $Variable \"\r\n\r\n    } #process\r\n\r\n    End {\r\n        Write-Verbose \"[$((Get-Date).TimeofDay) END    ] Ending $($myinvocation.mycommand)\"\r\n\r\n    } #end \r\n\r\n} #close Name\r\n<\/pre>\n<p>And turned it into a VSCode snippet.\u00a0 Because of the variables, which I want inserted,\u00a0 I need to edit the snippet. I found a better way to escape the $ sign for $myinvocation is to use \\\\$myinvocation.\u00a0 As I wrote previously this is because VSCode allows you use to placeholders in your snippets. This is the fun part. Here's the modified snippet code.<\/p>\n<pre class=\"lang:js mark:0 decode:true \">\"jh function\": {\r\n        \"prefix\": \"myfunction\",\r\n        \"body\": [\r\n            \"Function ${Name} {\\r\",\r\n            \"    [cmdletbinding()]\\r\",\r\n            \"    Param(\\r\",\r\n            \"        [Parameter(ValueFromPipeline)]\\r\",\r\n            \"        [${objecttype}]$${Variable}\\r\",\r\n            \"    )\\r\",\r\n            \"    Begin {\\r\",\r\n            \"        Write-Verbose \\\"[$((Get-Date).TimeofDay) BEGIN  ] Starting $(\\\\$myinvocation.mycommand)\\\"\\r\",\r\n            \"\\r\",\r\n            \"    } #begin\\r\",\r\n            \"\\r\",\r\n            \"    Process {\\r\",\r\n            \"        Write-Verbose \\\"[$((Get-Date).TimeofDay) PROCESS] $${Variable} \\\"\\r\",\r\n            \"\\r\",\r\n            \"    } #process\\r\",\r\n            \"\\r\",\r\n            \"    End {\\r\",\r\n            \"        Write-Verbose \\\"[$((Get-Date).TimeofDay) END    ] Ending $(\\\\$myinvocation.mycommand)\\\"\\r\",\r\n            \"\\r\",\r\n            \"    } #end \\r\",\r\n            \"\\r\",\r\n            \"} #close ${Name}\"\r\n        ],\r\n        \"description\": \"My function outline\"\r\n    }\r\n<\/pre>\n<p>I created place holders like ${Name} and ${ObjectType}. You should also note that I'm using ${Name} several places in the snippet. This is way.<\/p>\n<div style=\"width: 640px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-5499-1\" width=\"640\" height=\"406\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/vscode-placeholder.mp4?_=1\" \/><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/vscode-placeholder.mp4\">http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/vscode-placeholder.mp4<\/a><\/video><\/div>\n<p>After I insert the snippet, I can tab through the placeholders and start typing replacement text. If there are multiple instances of the placeholder they are all changed at once!<\/p>\n<p>And if your PowerShell.json file formatting gets a bit wonky, such as everything bunched together as one long string, open the file in VSCode and press Alt+Shift+F to make it pretty.<\/p>\n<p>You might also want to take a look at this series of articles from PowerShell MVP Keith Hill <a title=\"https:\/\/rkeithhill.wordpress.com\/2017\/02\/19\/scripting-guys-blog-posts-on-using-visual-studio-code-for-powershell-development\/\" href=\"https:\/\/rkeithhill.wordpress.com\/2017\/02\/19\/scripting-guys-blog-posts-on-using-visual-studio-code-for-powershell-development\/\" target=\"_blank\">https:\/\/rkeithhill.wordpress.com\/2017\/02\/19\/scripting-guys-blog-posts-on-using-visual-studio-code-for-powershell-development\/<\/a> to get even more out of VSCode.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few days ago I posted an entry that explained how to create and use snippets in Visual Studio Code. As mentioned in that article I&#8217;m attempting to make the transition to VSCode for all my PowerShell work. Being able to use snippets is just one feature that I rely on. And as a number&#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 Fun with VSCode #PowerShell Snippets","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],"tags":[534,464,526],"class_list":["post-5499","post","type-post","status-publish","format-standard","hentry","category-powershell","tag-powershell","tag-snippet","tag-vscode"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>More Fun with VSCode Snippets &#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\/5499\/more-fun-with-vscode-snippets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"More Fun with VSCode Snippets &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"A few days ago I posted an entry that explained how to create and use snippets in Visual Studio Code. As mentioned in that article I&#039;m attempting to make the transition to VSCode for all my PowerShell work. Being able to use snippets is just one feature that I rely on. And as a number...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-13T14:58:12+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image_thumb-10.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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"More Fun with VSCode Snippets\",\"datePublished\":\"2017-03-13T14:58:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/\"},\"wordCount\":336,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/image_thumb-10.png\",\"keywords\":[\"PowerShell\",\"Snippet\",\"VSCode\"],\"articleSection\":[\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/\",\"name\":\"More Fun with VSCode Snippets &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/image_thumb-10.png\",\"datePublished\":\"2017-03-13T14:58:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/image_thumb-10.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/image_thumb-10.png\",\"width\":455,\"height\":423},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5499\\\/more-fun-with-vscode-snippets\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"More Fun with VSCode Snippets\"}]},{\"@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 Fun with VSCode Snippets &#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\/5499\/more-fun-with-vscode-snippets\/","og_locale":"en_US","og_type":"article","og_title":"More Fun with VSCode Snippets &#8226; The Lonely Administrator","og_description":"A few days ago I posted an entry that explained how to create and use snippets in Visual Studio Code. As mentioned in that article I'm attempting to make the transition to VSCode for all my PowerShell work. Being able to use snippets is just one feature that I rely on. And as a number...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/","og_site_name":"The Lonely Administrator","article_published_time":"2017-03-13T14:58:12+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image_thumb-10.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":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"More Fun with VSCode Snippets","datePublished":"2017-03-13T14:58:12+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/"},"wordCount":336,"commentCount":0,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image_thumb-10.png","keywords":["PowerShell","Snippet","VSCode"],"articleSection":["PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/","name":"More Fun with VSCode Snippets &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image_thumb-10.png","datePublished":"2017-03-13T14:58:12+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image_thumb-10.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image_thumb-10.png","width":455,"height":423},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5499\/more-fun-with-vscode-snippets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"More Fun with VSCode Snippets"}]},{"@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":5488,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/5488\/adding-powershell-snippets-to-visual-studio-code\/","url_meta":{"origin":5499,"position":0},"title":"Adding PowerShell Snippets to Visual Studio Code","author":"Jeffery Hicks","date":"March 10, 2017","format":false,"excerpt":"So I've recently moved my daily work to a different laptop, a Yoga 900 with 16GB of RAM to be exact. I had been running Windows 8.1 but decided to jump in completely to a Windows 10 environment. As part of the process I've also made it a goal to\u2026","rel":"","context":"In &quot;Scripting&quot;","block_context":{"text":"Scripting","link":"https:\/\/jdhitsolutions.com\/blog\/category\/scripting\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image_thumb.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image_thumb.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/image_thumb.png?resize=525%2C300 1.5x"},"classes":[]},{"id":6348,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6348\/building-more-powershell-functions\/","url_meta":{"origin":5499,"position":1},"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":5078,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5078\/configuring-the-vscode-powershell-terminal\/","url_meta":{"origin":5499,"position":2},"title":"Configuring the VSCode PowerShell Terminal","author":"Jeffery Hicks","date":"June 9, 2016","format":false,"excerpt":"Yesterday I posted my experiences in setting up the latest build of VSCode on how to use a PowerShell terminal session. As I explained, in this particular session I didn't want to run any profile scripts. My reasoning was that this session obviously wasn't the ISE nor was I likely\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"VSCode PowerShell Session","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/06\/image_thumb-8.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/06\/image_thumb-8.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/06\/image_thumb-8.png?resize=525%2C300 1.5x"},"classes":[]},{"id":5907,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5907\/extending-vscode-with-powershell\/","url_meta":{"origin":5499,"position":3},"title":"Extending VSCode with PowerShell","author":"Jeffery Hicks","date":"March 2, 2018","format":false,"excerpt":"Last year I made a conscious decision to jump into VS Code as my primary PowerShell development tool. I had spent years tweaking and customizing the PowerShell ISE so I was a little concerned about the transition.\u00a0 But I knew the only way I'd master VS Code (and I still\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\/2018\/03\/image_thumb-3.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/03\/image_thumb-3.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/03\/image_thumb-3.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/03\/image_thumb-3.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8731,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8731\/fun-with-powershell-module-layout\/","url_meta":{"origin":5499,"position":4},"title":"Fun with PowerShell Module Layout","author":"Jeffery Hicks","date":"December 16, 2021","format":false,"excerpt":"As I've been working on my new PowerShell project, which I've discussed over recent posts, I keep \"discovering\" fun scripting opportunities. Today I want to share some code I've come up with that makes it easier to build a PowerShell module directory structure. There are plenty of existing tools and\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\/get-relativepath.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/get-relativepath.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/get-relativepath.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/12\/get-relativepath.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":3857,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3857\/dsc-resource-snippets\/","url_meta":{"origin":5499,"position":5},"title":"DSC Resource Snippets","author":"Jeffery Hicks","date":"May 23, 2014","format":false,"excerpt":"A few days ago I posted a PowerShell script that would generate a DSC configuration template. The idea was to generate all the code you might need and let you whittle it down to just what you need. On my primary system, I don't have any community or experimental DSC\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"talkbubble","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/10\/talkbubble.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5499","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=5499"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5499\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=5499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=5499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=5499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}