{"id":1136,"date":"2011-02-11T09:18:07","date_gmt":"2011-02-11T14:18:07","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=1136"},"modified":"2011-03-28T08:24:03","modified_gmt":"2011-03-28T12:24:03","slug":"friday-fun-snappy-shortcuts","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/","title":{"rendered":"Friday Fun &#8211; Snappy Shortcuts"},"content":{"rendered":"<p>In one of my recent Prof. PowerShell columns, I <a href=\"http:\/\/mcpmag.com\/articles\/2011\/02\/08\/arent-you-special-vbscript-and-powershell.aspx\" target=\"_blank\">wrote about using the Wscript.Shell VBScript object<\/a> in PowerShell to retrieve special folder paths. Another handy trick is the ability to create shortcut links to either file or web resources. Let me show you how to accomplish this in PowerShell and why you might want to.<!--more--><\/p>\n<p>The PowerShell version of this task is not much different from VBScript. First we create a reference to the Wscript.Shell object.<br \/>\n[cc lang=\"Powershell\"]<br \/>\nPS C:\\> $wshell=New-Object -ComObject \"Wscript.Shell\"<br \/>\n[\/cc]<\/p>\n<p>Then we call the CreateShortcut() method. We have to specify the full filename and path for the shortcut. We can create a web link using a .url extension or a file system shortcut using .lnk.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nPS C:\\> $link=$wshell.CreateShortcut(\"H:\\Links\\The Lonely Administrator.url\")<br \/>\n[\/cc]<br \/>\nThe link now requires a target path.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nPS C:\\> $link.TargetPath=\"http:\/\/jdhitsolutions.com\/blog\"<br \/>\n[\/cc]<br \/>\nFinally, the link won't be visible until we save it.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nPS C:\\> $link.Save()<br \/>\nPS C:\\> dir h:\\links<\/p>\n<p>    Directory: H:\\links<\/p>\n<p>Mode                LastWriteTime     Length Name<br \/>\n----                -------------     ------ ----<br \/>\n-a---         2\/11\/2011   8:56 AM        119 The Lonely Administrator.url<br \/>\n[\/cc]<\/p>\n<p>If you create a .lnk object then you can set a number of other properties like a Window style, icon and hot key.  But I'll let you explore those on your own. But really, if this is all I'm doing PowerShell doesn't bring anything extra to the party. I might as well stick with VBScript.<\/p>\n<p>So let's find something extra where PowerShell makes sense. I'll take a CSV file with new shortcut information, import it and create the relevant shortcuts. This is much easier to do in PowerShell than VBScript.  First, here's my CSV file, or at least what it looks like when imported.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nPS C:\\> import-csv C:\\work\\Links.csv | format-table -AutoSize<\/p>\n<p>Name                     Path     TargetPath                                                   Type<br \/>\n----                     ----     ----------                                                   ----<br \/>\nThe Lonely Administrator Desktop  http:\/\/jdhitsolutions.com\/blog                               url<br \/>\nISO Files                Desktop  \\\\jdh-nvnas\\files\\iso                                        lnk<br \/>\nTechnet Script Center    h:\\links http:\/\/technet.microsoft.com\/en-us\/scriptcenter\/default.aspx url<br \/>\nScripting Guy            Desktop  http:\/\/blogs.technet.com\/b\/heyscriptingguy\/                  url<br \/>\nScriptingAnswers         h:\\links http:\/\/www.scriptinganswers.com                              url<br \/>\nTools                    h:\\links \\\\jdh-nvnas\\files\\Tools                                      lnk<br \/>\nProf. PowerShell         h:\\links http:\/\/mcpmag.com\/Articles\/List\/Prof-Powershell.aspx         url<br \/>\n[\/cc]<br \/>\nI have a mix of file and web links. The path indicates where to create the link. \"Desktop\" means use the Desktop special folder.  Here's how easy this is:<br \/>\n[cc lang=\"PowerShell\"]<br \/>\n$file=\"c:\\work\\links.csv\"<\/p>\n<p>$wshell=New-Object -ComObject \"Wscript.Shell\"<\/p>\n<p>Import-CSV $file | foreach {<\/p>\n<p>if ($_.Path -eq \"Desktop\")<br \/>\n    {<br \/>\n      $linkpath=Join-path -Path ($wshell.SpecialFolders.Item(\"Desktop\")) `<br \/>\n      -ChildPath \"$($_.Name).$($_.type)\"<br \/>\n    }<br \/>\n    else<br \/>\n    {<br \/>\n      $linkpath=Join-Path -Path $_.Path -ChildPath \"$($_.Name).$($_.type)\"<br \/>\n    }<br \/>\n    Write-Host \"Creating $linkpath\" -ForegroundColor Green<br \/>\n    $link=$wshell.CreateShortcut($linkpath)<br \/>\n    $link.TargetPath=$_.TargetPath<br \/>\n    $link.Save()<br \/>\n    Get-Item $linkpath<br \/>\n}<br \/>\n[\/cc]<br \/>\nThe only tricky part is using Join-Path to construct a filename and path. Notice that if the Path property on my imported object equals Desktop, I use the SpecialFolders object to retrieve that path. I could have used other special folders as well. I use Get-Item to write the file object to the pipeline in case I want to do anything else with it.<br \/>\n<a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/create-shortcuts.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/create-shortcuts-300x185.png\" alt=\"\" title=\"create-shortcuts\" width=\"300\" height=\"185\" class=\"aligncenter size-medium wp-image-1137\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/create-shortcuts-300x185.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/create-shortcuts.png 997w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nI hope you had some fun with this. But the real lesson I hope you'll take from it is that even though you can use VBScript objects in a PowerShell script, if you aren't taking advantage of PowerShell features and strengths, why bother?<\/p>\n<p>If you would like to try my code and CSV file, you can download it <a href='http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/New-ShortcutLink.zip'>here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In one of my recent Prof. PowerShell columns, I wrote about using the Wscript.Shell VBScript object in PowerShell to retrieve special folder paths. Another handy trick is the ability to create shortcut links to either file or web resources. Let me show you how to accomplish this in PowerShell and why you might want to.<\/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":"","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":[271,4,8],"tags":[251,534,172,535,170],"class_list":["post-1136","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","category-scripting","tag-join-path","tag-powershell","tag-shortcut","tag-vbscript","tag-wscript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun - Snappy Shortcuts &#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\/1136\/friday-fun-snappy-shortcuts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun - Snappy Shortcuts &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"In one of my recent Prof. PowerShell columns, I wrote about using the Wscript.Shell VBScript object in PowerShell to retrieve special folder paths. Another handy trick is the ability to create shortcut links to either file or web resources. Let me show you how to accomplish this in PowerShell and why you might want to.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2011-02-11T14:18:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2011-03-28T12:24:03+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/create-shortcuts-300x185.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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun &#8211; Snappy Shortcuts\",\"datePublished\":\"2011-02-11T14:18:07+00:00\",\"dateModified\":\"2011-03-28T12:24:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/\"},\"wordCount\":612,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/02\\\/create-shortcuts-300x185.png\",\"keywords\":[\"Join-Path\",\"PowerShell\",\"Shortcut\",\"VBScript\",\"Wscript\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/\",\"name\":\"Friday Fun - Snappy Shortcuts &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/02\\\/create-shortcuts-300x185.png\",\"datePublished\":\"2011-02-11T14:18:07+00:00\",\"dateModified\":\"2011-03-28T12:24:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/02\\\/create-shortcuts.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/02\\\/create-shortcuts.png\",\"width\":\"997\",\"height\":\"618\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1136\\\/friday-fun-snappy-shortcuts\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun &#8211; Snappy Shortcuts\"}]},{\"@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":"Friday Fun - Snappy Shortcuts &#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\/1136\/friday-fun-snappy-shortcuts\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun - Snappy Shortcuts &#8226; The Lonely Administrator","og_description":"In one of my recent Prof. PowerShell columns, I wrote about using the Wscript.Shell VBScript object in PowerShell to retrieve special folder paths. Another handy trick is the ability to create shortcut links to either file or web resources. Let me show you how to accomplish this in PowerShell and why you might want to.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/","og_site_name":"The Lonely Administrator","article_published_time":"2011-02-11T14:18:07+00:00","article_modified_time":"2011-03-28T12:24:03+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/create-shortcuts-300x185.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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun &#8211; Snappy Shortcuts","datePublished":"2011-02-11T14:18:07+00:00","dateModified":"2011-03-28T12:24:03+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/"},"wordCount":612,"commentCount":2,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/create-shortcuts-300x185.png","keywords":["Join-Path","PowerShell","Shortcut","VBScript","Wscript"],"articleSection":["Friday Fun","PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/","name":"Friday Fun - Snappy Shortcuts &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/create-shortcuts-300x185.png","datePublished":"2011-02-11T14:18:07+00:00","dateModified":"2011-03-28T12:24:03+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/create-shortcuts.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/create-shortcuts.png","width":"997","height":"618"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1136\/friday-fun-snappy-shortcuts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun &#8211; Snappy Shortcuts"}]},{"@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":4293,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4293\/send-from-powershell-ise-to-microsoft-word-revisited\/","url_meta":{"origin":1136,"position":0},"title":"Send from PowerShell ISE to Microsoft Word Revisited","author":"Jeffery Hicks","date":"March 16, 2015","format":false,"excerpt":"Many of you seemed to like my little PowerShell ISE add-on to send text from the script pane to a Word document. I should have known someone would ask about a way to make it colorized. You can manually select lines in a script and when you paste them into\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":7386,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/","url_meta":{"origin":1136,"position":1},"title":"PSDrives, Shortcuts and Links","author":"Jeffery Hicks","date":"April 15, 2020","format":false,"excerpt":"I'll be honest. I've never been much of a OneDrive user. Even though I'm a great candidate given that I use multiple systems and need access to a common set of files. But for a number of reasons I'm beginning to make more of a shift to OneDrive. Part of\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\/04\/tools-link.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-link.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-link.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-link.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":595,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/595\/new-file-shortcut\/","url_meta":{"origin":1136,"position":2},"title":"New File Shortcut","author":"Jeffery Hicks","date":"March 18, 2010","format":false,"excerpt":"I've been looking at the File Server Resource Manager (FSRM) feature in Windows Server 2008 R2 a lot lately. One very nice part of FSRM is the ability to schedule typical file management tasks. One of the examples from the Microsoft storage team is to create a custom task to\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":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/03\/image_thumb.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":7476,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7476\/open-windows-terminal-powershell-split-paned\/","url_meta":{"origin":1136,"position":3},"title":"Open Windows Terminal PowerShell Split Paned","author":"Jeffery Hicks","date":"May 14, 2020","format":false,"excerpt":"The other night I presented for the Mississippi PowerShell User Group on how to get started using Windows Terminal. This has been my go-to PowerShell console for quite a while. I use Windows Terminal for everything. During the talk a question came up about starting a session with split panes.\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\/05\/wt-split.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/wt-split.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":2976,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2976\/powershell-popup\/","url_meta":{"origin":1136,"position":4},"title":"PowerShell PopUp","author":"Jeffery Hicks","date":"April 29, 2013","format":false,"excerpt":"At the recent PowerShell Summit I presented a session on adding graphical elements to your script without the need for WinForms or WPF. One of the items I demonstrated is a graphical popup that can either require the user to click a button or automatically dismiss after a set time\u2026","rel":"","context":"In &quot;Conferences&quot;","block_context":{"text":"Conferences","link":"https:\/\/jdhitsolutions.com\/blog\/category\/conferences\/"},"img":{"alt_text":"popup","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/popup-300x139.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1580,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1580\/filtering-empty-values-in-powershell\/","url_meta":{"origin":1136,"position":5},"title":"Filtering Empty Values in PowerShell","author":"Jeffery Hicks","date":"August 3, 2011","format":false,"excerpt":"I saw this tip today and wanted to leave a comment but couldn't see how. So I thought I'd post my comments here. This is actually a question I see often and there are better ways to write this kind of code. The posted tip used an example where you\u2026","rel":"","context":"In &quot;Best Practices&quot;","block_context":{"text":"Best Practices","link":"https:\/\/jdhitsolutions.com\/blog\/category\/best-practices\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1136","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=1136"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1136\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}