{"id":2162,"date":"2012-04-06T10:30:40","date_gmt":"2012-04-06T14:30:40","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=2162"},"modified":"2012-04-04T10:15:06","modified_gmt":"2012-04-04T14:15:06","slug":"friday-fun-get-next-available-drive-letter","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/","title":{"rendered":"Friday Fun: Get Next Available Drive Letter"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-2165\" title=\"computereye\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye-150x150.png\" alt=\"\" width=\"150\" height=\"150\" \/><\/a>A few days ago I saw on question, I think on Facebook, about using PowerShell to find the next available drive letter that could be used for mapping a network drive. Before I show you my approach, let me state that if you need to map a drive in PowerShell for use only within your PowerShell solution, you don't need a drive letter. You can name the drive anything you want when using New-PSDrive.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\nnew-psdrive Backup -PSProvider Filesystem -Root \"\\\\NAS01\\backup\"<br \/>\n<\/code><\/p>\n<p>But of course that won't work if you plan on using the NET USE command. So let's figure out how to determine the next available drive letter. First, let's build an array of possible drive letters. I'm too lazy to type the letters C-Z (skipping A and B for the sake of nostalgia). So I'll \"create\" them like this:<\/p>\n<p><code lang=\"PowerShell\"><br \/>\n$letters=[char[]](67..90)<br \/>\n<\/code><\/p>\n<p>This creates an array of letters C-Z, albeit technically [CHAR] objects, but we're good. Next we need a list of currently used drive letters which we can retrieve from WMI.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\n$devices=get-wmiobject win32_logicaldisk | select -expand DeviceID<br \/>\n<\/code><\/p>\n<p>I'm expanding the DeviceID property so $devices is a simple array and not a collection of objects with a DeviceID property. I did that so that I could use the -Contains operator.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\n$letters | where {$devices -notcontains \"$($_):\"} | Select -first 1<br \/>\n<\/code><\/p>\n<p>With this simple command I'm piping the collection of characters to Where-Object, testing if each letter (with the appended \ud83d\ude42 is NOT found in the array $devices. The letters are already sorted so all I need to do is select the first 1 and that will be the next available drive letter in my current PowerShell session.<\/p>\n<p>Before I let you go today, let me point out one thing: I could combine these two lines into a single PowerShell one-liner.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\n[char[]](67..90) | Where {(get-wmiobject win32_logicaldisk | select -expand DeviceID) -notcontains \"$($_):\"} | Select -first 1<br \/>\n<\/code><\/p>\n<p>I'll get the same result...BUT...just because you can do something in PowerShell doesn't mean you should. This one liner takes almost 2400MS to execute. But when I break it into two lines, as I showed you, I get the end result in 110MS which is a dramatic and noticeable difference. You can test for yourself using Measure-Command. The take-away is to not be afraid to use multiple commands, especially in a script. It may be faster and it will certainly be easier to understand.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few days ago I saw on question, I think on Facebook, about using PowerShell to find the next available drive letter that could be used for mapping a network drive. Before I show you my approach, let me state that if you need to map a drive in PowerShell for use only within your&#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":"","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":[145,230,534,547],"class_list":["post-2162","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","category-scripting","tag-array","tag-fridayfun","tag-powershell","tag-wmi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun: Get Next Available Drive Letter &#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\/2162\/friday-fun-get-next-available-drive-letter\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun: Get Next Available Drive Letter &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"A few days ago I saw on question, I think on Facebook, about using PowerShell to find the next available drive letter that could be used for mapping a network drive. Before I show you my approach, let me state that if you need to map a drive in PowerShell for use only within your...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2012-04-06T14:30:40+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye-150x150.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\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun: Get Next Available Drive Letter\",\"datePublished\":\"2012-04-06T14:30:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/\"},\"wordCount\":377,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/04\\\/computereye-150x150.png\",\"keywords\":[\"Array\",\"FridayFun\",\"PowerShell\",\"WMI\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/\",\"name\":\"Friday Fun: Get Next Available Drive Letter &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/04\\\/computereye-150x150.png\",\"datePublished\":\"2012-04-06T14:30:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/04\\\/computereye.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/04\\\/computereye.png\",\"width\":\"896\",\"height\":\"1024\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2162\\\/friday-fun-get-next-available-drive-letter\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun: Get Next Available Drive Letter\"}]},{\"@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: Get Next Available Drive Letter &#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\/2162\/friday-fun-get-next-available-drive-letter\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun: Get Next Available Drive Letter &#8226; The Lonely Administrator","og_description":"A few days ago I saw on question, I think on Facebook, about using PowerShell to find the next available drive letter that could be used for mapping a network drive. Before I show you my approach, let me state that if you need to map a drive in PowerShell for use only within your...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/","og_site_name":"The Lonely Administrator","article_published_time":"2012-04-06T14:30:40+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye-150x150.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\/2162\/friday-fun-get-next-available-drive-letter\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun: Get Next Available Drive Letter","datePublished":"2012-04-06T14:30:40+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/"},"wordCount":377,"commentCount":6,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye-150x150.png","keywords":["Array","FridayFun","PowerShell","WMI"],"articleSection":["Friday Fun","PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/","name":"Friday Fun: Get Next Available Drive Letter &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye-150x150.png","datePublished":"2012-04-06T14:30:40+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye.png","width":"896","height":"1024"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2162\/friday-fun-get-next-available-drive-letter\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun: Get Next Available Drive Letter"}]},{"@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":6547,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-core\/6547\/updating-powershell-core-windows-compatibility\/","url_meta":{"origin":2162,"position":0},"title":"Updating PowerShell Core Windows Compatibility","author":"Jeffery Hicks","date":"February 26, 2019","format":false,"excerpt":"I thought I'd share a quick update on my experiences in living in a PowerShell Core world. One of the things that Microsoft is working on to make this easier is a way to access your Windows PowerShell modules that will work in PowerShell Core. It does this through commands\u2026","rel":"","context":"In &quot;PowerShell Core&quot;","block_context":{"text":"PowerShell Core","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-core\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-17.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-17.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-17.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-17.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8572,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/8572\/fun-with-mapping-powershell-drives\/","url_meta":{"origin":2162,"position":1},"title":"Fun with Mapping PowerShell Drives","author":"Jeffery Hicks","date":"September 22, 2021","format":false,"excerpt":"Because I spend my day working from a PowerShell prompt, I rely heavily on PSDrives to quickly access files and folders. And because I am mobile, I might be working at my desk in my home office, or I might be on the road with my trusty Thinkpad. Of course,\u2026","rel":"","context":"In &quot;Scripting&quot;","block_context":{"text":"Scripting","link":"https:\/\/jdhitsolutions.com\/blog\/category\/scripting\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/09\/convert-csv.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/09\/convert-csv.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/09\/convert-csv.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/09\/convert-csv.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7386,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/","url_meta":{"origin":2162,"position":2},"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":2441,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2441\/fun-with-psdrive-locations\/","url_meta":{"origin":2162,"position":3},"title":"Fun with PSDrive Locations","author":"Jeffery Hicks","date":"July 10, 2012","format":false,"excerpt":"A PowerShell PSDrive is a mapping between a PowerShell provider and a resource. The majority of our work is done in a file system PSDrive that corresponds to a file system drive. Let me show you a little trick that might come in handy with a PSDrive. My \"trick\" should\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\/2012\/07\/map-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2542,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-3-0\/2542\/powershell-workflow-bug\/","url_meta":{"origin":2162,"position":4},"title":"PowerShell Workflow Bug","author":"Jeffery Hicks","date":"October 31, 2012","format":false,"excerpt":"There is bug with workflows in PowerShell v3 that you might run into. I kept banging into it until I tracked it down. \u00a0The problem occurs if you try to run a workflow from a PSDrive that you have added. For example, I have a PSDrive (S) which is mapped\u2026","rel":"","context":"In &quot;Powershell 3.0&quot;","block_context":{"text":"Powershell 3.0","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-3-0\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":553,"url":"https:\/\/jdhitsolutions.com\/blog\/active-directory\/553\/a-smart-psdrive-provider\/","url_meta":{"origin":2162,"position":5},"title":"A Smart PSDrive Provider","author":"Jeffery Hicks","date":"January 13, 2010","format":false,"excerpt":"I\u2019ve been doing a lot with the ActiveDirectory module that ships with Windows Server 2008 R2 and which you can also use with the Remote Server Administration Tools on WIndows 7.\u00a0 As I was trying things out with the PSDrive provider I discovered something very cool. When you load the\u2026","rel":"","context":"In &quot;Active Directory&quot;","block_context":{"text":"Active Directory","link":"https:\/\/jdhitsolutions.com\/blog\/category\/active-directory\/"},"img":{"alt_text":"captured_Image.png","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/01\/captured_Image.png_thumb.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2162","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=2162"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2162\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=2162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=2162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=2162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}