{"id":7386,"date":"2020-04-15T10:07:10","date_gmt":"2020-04-15T14:07:10","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=7386"},"modified":"2021-04-09T14:27:04","modified_gmt":"2021-04-09T18:27:04","slug":"psdrives-shortcuts-and-links","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/","title":{"rendered":"PSDrives, Shortcuts and Links"},"content":{"rendered":"\n<p>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 the challenge for me has been making it easy to access files in OneDrive. For me, that access might be in a PowerShell session or Windows Explorer. To make this a painless process there are a few options at my disposal.<\/p>\n\n\n\n<p>I want to avoid having to remember where my OneDrive folder is and navigating to it. For the sake of demonstration, I want to make it easy to access the Tools subfolder which contains local copies of the SysInternals suite.<\/p>\n\n\n\n<figure class=\"wp-block-image is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1148\" height=\"731\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools.jpg\" alt=\"onedrive-tools\" class=\"wp-image-7387\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools.jpg 1148w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools-300x191.jpg 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools-1024x652.jpg 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools-768x489.jpg 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools-850x541.jpg 850w\" sizes=\"auto, (max-width: 1148px) 100vw, 1148px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">PSDrive<\/h2>\n\n\n\n<p>The first option I have is to create a PS Drive in PowerShell. This is very easy.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\"><code>New-PSDrive -Name Tools -PSProvider FileSystem -Root ~\\OneDrive\\tools<\/code><\/code><\/pre>\n\n\n\n<p>I am using the console shortcut of ~ which will resolve to C:\\Users\\Jeff.<\/p>\n\n\n\n<figure class=\"wp-block-image is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1402\" height=\"283\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-psdrive-1.jpg\" alt=\"tools-psdrive\" class=\"wp-image-7389\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-psdrive-1.jpg 1402w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-psdrive-1-300x61.jpg 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-psdrive-1-1024x207.jpg 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-psdrive-1-768x155.jpg 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-psdrive-1-850x172.jpg 850w\" sizes=\"auto, (max-width: 1402px) 100vw, 1402px\" \/><\/figure>\n\n\n\n<p>I did this because one of the disadvantages of using a PSDrive is that it only persists for as long as my session is running. I'd have to put the New-PSDrive statement in my PowerShell profile script on every computer. But on this computer I might be signed in as 'Jeff'. On another it might be 'jeffh'.&nbsp; Assuming OneDrive is always under C:\\Users, I can easily share the same profile among all computers.<\/p>\n\n\n\n<p>One advantage of using a PSDrive is that I can call it anything. I'm not limited to a drive letter.<\/p>\n\n\n\n<figure class=\"wp-block-image is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1034\" height=\"688\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/2020-04-15_9-07-35.jpg\" alt=\"2020-04-15_9-07-35\" class=\"wp-image-7390\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/2020-04-15_9-07-35.jpg 1034w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/2020-04-15_9-07-35-300x200.jpg 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/2020-04-15_9-07-35-1024x681.jpg 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/2020-04-15_9-07-35-768x511.jpg 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/2020-04-15_9-07-35-850x566.jpg 850w\" sizes=\"auto, (max-width: 1034px) 100vw, 1034px\" \/><\/figure>\n\n\n\n<p>But this drive isn't available in Windows Explorer or even other PowerShell sessions unless I create via a profile script. Still, this is a valid technique as long as you are aware of the limitations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Linked Directory<\/h2>\n\n\n\n<p>Another option is to create some type of directory link, such as a symbolic link. This is easy to do with New-Item.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">New-Item -Path D:\\ -Name Tools -ItemType SymbolicLink -Value ~\\OneDrive\\tools<\/code><\/pre>\n\n\n\n<p>If you read the help for New-Item you'll see that there are a few options. I tend to like SymbolicLink because it lets me create links across volumes.<\/p>\n\n\n\n<figure class=\"wp-block-image is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"942\" height=\"388\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-link.jpg\" alt=\"tools-link\" class=\"wp-image-7391\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-link.jpg 942w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-link-300x124.jpg 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-link-768x316.jpg 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-link-850x350.jpg 850w\" sizes=\"auto, (max-width: 942px) 100vw, 942px\" \/><\/figure>\n\n\n\n<p>Any changes I make to files in D:\\tools are reflected in the OneDrive folder and vice versa. This includes creating and deleting files. Plus I can use the folder outside of PowerShell.<\/p>\n\n\n\n<figure class=\"wp-block-image is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"510\" height=\"137\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-explorer.jpg\" alt=\"tools-explorer\" class=\"wp-image-7392\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-explorer.jpg 510w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/tools-explorer-300x81.jpg 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/figure>\n\n\n\n<p>The folder is linked as you can see by the icon. Clicking on it opens the OneDrive folder.<\/p>\n\n\n\n<p>If I decide I need to remove the linked directory, in a PowerShell 7 session it just works.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">Remove-Item D:\\tools<\/code><\/pre>\n\n\n\n<p>This deletes the linked folder but leaves the OneDrive source alone. However in Windows PowerShell it is a little more problematic. This command should work, but doesn't.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">Remove-Item D:\\tools -Force -Recurse<\/code><\/pre>\n\n\n\n<p>You can delete the folder like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">(Get-Item D:\\tools).Delete()<\/code><\/pre>\n\n\n\n<p>Of if you have the <em>junction<\/em> utility from Sysinsternals, this would also do the trick.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">~\\onedrive\\tools\\junction.exe -d d:\\tools<\/code><\/pre>\n\n\n\n<p>In any case, the OneDrive folder remains. By the way, you could also use <em>junction<\/em> to create linked folders.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Shortcut Folder<\/h2>\n\n\n\n<p>The last technique is an old school approach and that is to create a shortcut link in Windows. You can do this from PowerShell as well using the Wscript.Shell COM object from the VBScript days.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">$wshell = New-Object -ComObject \"Wscript.Shell\"\n$link = $wshell.CreateShortcut(\"D:\\Tools.lnk\")\n$link.TargetPath = \"c:\\users\\jeff\\OneDrive\\tools\"\n$link.Description = \"Sysinternals Tools\"\n$link.Save()<\/code><\/pre>\n\n\n\n<p>This doesn't help me from the console because all I see is a file called D:\\Tools.lnk. But in Windows Explorer I can click the link and jump to the OneDrive Tools folder. I can even see the description when I hover over the link. Deleting the lnk file deletes the link. If all I need is an easy way to get to my stuff in Windows Explorer this might be a good technique.<\/p>\n\n\n\n<p>There isn't one perfect technique here. And of course, this is not an exhaustive list. But knowing the pros and cons I can figure out what works for me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ll be honest. I&#8217;ve never been much of a OneDrive user. Even though I&#8217;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&#8217;m beginning to make more of a shift to OneDrive. Part of the challenge for me has&#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 stuff from the blog: PSDrives, Shortcuts and Links","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":[123,625,534],"class_list":["post-7386","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","tag-files","tag-onedrive","tag-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PSDrives, Shortcuts and Links &#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\/7386\/psdrives-shortcuts-and-links\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PSDrives, Shortcuts and Links &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"I&#039;ll be honest. I&#039;ve never been much of a OneDrive user. Even though I&#039;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&#039;m beginning to make more of a shift to OneDrive. Part of the challenge for me has...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-15T14:07:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-09T18:27:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools.jpg\" \/>\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\\\/7386\\\/psdrives-shortcuts-and-links\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"PSDrives, Shortcuts and Links\",\"datePublished\":\"2020-04-15T14:07:10+00:00\",\"dateModified\":\"2021-04-09T18:27:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/\"},\"wordCount\":638,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/onedrive-tools.jpg\",\"keywords\":[\"Files\",\"OneDrive\",\"PowerShell\"],\"articleSection\":[\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/\",\"name\":\"PSDrives, Shortcuts and Links &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/onedrive-tools.jpg\",\"datePublished\":\"2020-04-15T14:07:10+00:00\",\"dateModified\":\"2021-04-09T18:27:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/onedrive-tools.jpg\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/onedrive-tools.jpg\",\"width\":1148,\"height\":731},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7386\\\/psdrives-shortcuts-and-links\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PSDrives, Shortcuts and Links\"}]},{\"@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":"PSDrives, Shortcuts and Links &#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\/7386\/psdrives-shortcuts-and-links\/","og_locale":"en_US","og_type":"article","og_title":"PSDrives, Shortcuts and Links &#8226; The Lonely Administrator","og_description":"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 the challenge for me has...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/","og_site_name":"The Lonely Administrator","article_published_time":"2020-04-15T14:07:10+00:00","article_modified_time":"2021-04-09T18:27:04+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools.jpg","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\/7386\/psdrives-shortcuts-and-links\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"PSDrives, Shortcuts and Links","datePublished":"2020-04-15T14:07:10+00:00","dateModified":"2021-04-09T18:27:04+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/"},"wordCount":638,"commentCount":7,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools.jpg","keywords":["Files","OneDrive","PowerShell"],"articleSection":["PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/","name":"PSDrives, Shortcuts and Links &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools.jpg","datePublished":"2020-04-15T14:07:10+00:00","dateModified":"2021-04-09T18:27:04+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools.jpg","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/04\/onedrive-tools.jpg","width":1148,"height":731},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7386\/psdrives-shortcuts-and-links\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"PSDrives, Shortcuts and Links"}]},{"@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":9323,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9323\/module-linking\/","url_meta":{"origin":7386,"position":0},"title":"Module Linking","author":"Jeffery Hicks","date":"February 27, 2024","format":false,"excerpt":"I know it has been a while since I've given the blog any attention. I am hoping to correct that in 2024, although I'm already behind schedule. But let's get to it. I have a short tip today that you may find useful, especially if you write modules for your\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":8572,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/8572\/fun-with-mapping-powershell-drives\/","url_meta":{"origin":7386,"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":7422,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7422\/backing-up-windows-terminal-settings-with-powershell\/","url_meta":{"origin":7386,"position":2},"title":"Backing Up Windows Terminal Settings with PowerShell","author":"Jeffery Hicks","date":"April 30, 2020","format":false,"excerpt":"I've been a big fan of Windows Terminal since the very beginning. In fact, I've been using it for so long that I've been moving along profile settings that have long since changed. I didn't bother to update my settings. Part of the challenge is that the app will update\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":3796,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3796\/configure-local-user-account-with-dsc\/","url_meta":{"origin":7386,"position":3},"title":"Configure Local User Account with DSC","author":"Jeffery Hicks","date":"April 16, 2014","format":false,"excerpt":"Yesterday I posted an article on how to use PowerShell and the [ADSI] type accelerator to set a local user account. However, if you are running PowerShell 4.0 you have another option: Desired State Configuration (DSC). I'm going to assume you have some basic understanding of how DSC works. If\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":[]},{"id":7931,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7931\/extracting-icons-with-powershell\/","url_meta":{"origin":7386,"position":4},"title":"Extracting Icons with PowerShell","author":"Jeffery Hicks","date":"December 7, 2020","format":false,"excerpt":"Last week I was seeing what else I could add to my Windows Terminal setup. If you can launch a console from the command line, you can probably create a Windows Terminal profile for it. Recently, I've added Ruby and Python to my desktop, both of which have interactive consoles.\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\/12\/extract.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/extract.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/extract.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/extract.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/extract.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/extract.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":7296,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7296\/getting-productive-with-linux\/","url_meta":{"origin":7386,"position":5},"title":"Getting Productive with Linux","author":"Jeffery Hicks","date":"February 21, 2020","format":false,"excerpt":"Yesterday I started telling you about my journey or experiment with \u00a0going all in on Linux. I'm hoping that spending at least a month heads down in a Linux environment will help me learn it better, than simply reading documentation and blog posts. I still have my Windows desktop for\u2026","rel":"","context":"In &quot;Lenovo&quot;","block_context":{"text":"Lenovo","link":"https:\/\/jdhitsolutions.com\/blog\/category\/lenovo\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/install-samba-150x150.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/install-samba-150x150.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/install-samba-150x150.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/install-samba-150x150.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/install-samba-150x150.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/install-samba-150x150.png?resize=1400%2C800&ssl=1 4x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7386","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=7386"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7386\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}