{"id":8420,"date":"2021-05-20T14:53:48","date_gmt":"2021-05-20T18:53:48","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=8420"},"modified":"2021-05-20T14:53:51","modified_gmt":"2021-05-20T18:53:51","slug":"managing-the-windows-10-taskbar-with-powershell","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/","title":{"rendered":"Managing the Windows 10 Taskbar with PowerShell"},"content":{"rendered":"\n<p>When I'm working on a Pluralsight course, I tend to setup a virtual machine for recording. Although, lately I've been trying with Windows 10 Sandbox. This is handy when all I need is a Windows 10 desktop. When I setup the system, I have particular settings I need to configure. Naturally I use a PowerShell script to automate the process. One item that I wanted to address was Windows 10 taskbar. When I'm recording a course, I like to have it auto-hide. Sure, I could manually set it. But that's no fun.<\/p>\n\n\n\n<p>After a little online research I came across <a href=\"https:\/\/www.howtogeek.com\/677619\/how-to-hide-the-taskbar-on-windows-10\/\" target=\"_blank\" rel=\"noreferrer noopener\">this page<\/a>. In addition to the manual steps, the author also provided a snippet of PowerShell code! I assumed there would be registry setting I could configure and was hoping to find that. But this was even better. The author's code was written to be used from a CMD prompt to invoke a few PowerShell commands. But since I'm already using PowerShell for my desktop configuration, I took his code and created re-usable PowerShell functions.<\/p>\n\n\n\n<p>The hack is to modify the registry key found at 'HKCU:SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StuckRects3'. The Settings key is binary. But in PowerShell, it will be shown as an array.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png\"><img loading=\"lazy\" decoding=\"async\" width=\"766\" height=\"201\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png\" alt=\"\" class=\"wp-image-8421\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png 766w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings-300x79.png 300w\" sizes=\"auto, (max-width: 766px) 100vw, 766px\" \/><\/a><\/figure>\n\n\n\n<p>To toggle the auto-hide setting for the Taskbar, all you need to so is set item [8]. A value of 3 will enable auto-hide and 2 will turn it off.  There is one caveat, and that is you need to restart the Explorer process for the change to take effect. No problem. I can use Stop-Process. Want to see what I came up with?<\/p>\n\n\n\n<pre title=\"TaskBarTools.ps1\" class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\"><em>#requires\u00a0-version\u00a05.1<\/em>\n\n<em>#\u00a0https:\/\/www.howtogeek.com\/677619\/how-to-hide-the-taskbar-on-windows-10\/<\/em>\n\nFunction\u00a0Enable-AutoHideTaskBar\u00a0{\n\u00a0\u00a0\u00a0\u00a0<em>#This\u00a0will\u00a0configure\u00a0the\u00a0Windows\u00a0taskbar\u00a0to\u00a0auto-hide<\/em>\n\u00a0\u00a0\u00a0\u00a0[cmdletbinding(<em>SupportsShouldProcess<\/em>)]\n\u00a0\u00a0\u00a0\u00a0[Alias(\"Hide-TaskBar\")]\n\u00a0\u00a0\u00a0\u00a0[OutputType(\"None\")]\n\u00a0\u00a0\u00a0\u00a0Param()\n\n\u00a0\u00a0\u00a0\u00a0Begin\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Write-Verbose\u00a0\"[$((Get-Date).TimeofDay)\u00a0BEGIN\u00a0\u00a0]\u00a0Starting\u00a0$($myinvocation.mycommand)\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$RegPath\u00a0=\u00a0'HKCU:SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StuckRects3'\n\u00a0\u00a0\u00a0\u00a0}\u00a0<em>#begin<\/em>\n\u00a0\u00a0\u00a0\u00a0Process\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if\u00a0(Test-Path\u00a0$regpath)\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Write-Verbose\u00a0\"[$((Get-Date).TimeofDay)\u00a0PROCESS]\u00a0Auto\u00a0Hiding\u00a0Windows\u00a010\u00a0TaskBar\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$RegValues\u00a0=\u00a0(Get-ItemProperty\u00a0<em>-Path<\/em>\u00a0$RegPath).Settings\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$RegValues[8]\u00a0=\u00a03\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Set-ItemProperty\u00a0<em>-Path<\/em>\u00a0$RegPath\u00a0<em>-Name<\/em>\u00a0Settings\u00a0<em>-Value<\/em>\u00a0$RegValues\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if\u00a0($PSCmdlet.ShouldProcess(\"Explorer\",\u00a0\"Restart\"))\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<em>#Kill\u00a0the\u00a0Explorer\u00a0process\u00a0to\u00a0force\u00a0the\u00a0change<\/em>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Stop-Process\u00a0<em>-Name<\/em>\u00a0explorer\u00a0<em>-Force<\/em>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Write-Warning\u00a0\"Can't\u00a0find\u00a0registry\u00a0location\u00a0$regpath.\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0}\u00a0<em>#process<\/em>\n\u00a0\u00a0\u00a0\u00a0End\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Write-Verbose\u00a0\"[$((Get-Date).TimeofDay)\u00a0END\u00a0\u00a0\u00a0\u00a0]\u00a0Ending\u00a0$($myinvocation.mycommand)\"\n\u00a0\u00a0\u00a0\u00a0}\u00a0<em>#end<\/em>\n\n}\n\nFunction\u00a0Disable-AutoHideTaskBar\u00a0{\n\u00a0\u00a0\u00a0\u00a0<em>#This\u00a0will\u00a0disable\u00a0the\u00a0Windows\u00a0taskbar\u00a0auto-hide\u00a0setting<\/em>\n\u00a0\u00a0\u00a0\u00a0[cmdletbinding(<em>SupportsShouldProcess<\/em>)]\n\u00a0\u00a0\u00a0\u00a0[Alias(\"Show-TaskBar\")]\n\u00a0\u00a0\u00a0\u00a0[OutputType(\"None\")]\n\u00a0\u00a0\u00a0\u00a0Param()\n\n\u00a0\u00a0\u00a0\u00a0Begin\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Write-Verbose\u00a0\"[$((Get-Date).TimeofDay)\u00a0BEGIN\u00a0\u00a0]\u00a0Starting\u00a0$($myinvocation.mycommand)\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$RegPath\u00a0=\u00a0'HKCU:SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\StuckRects3'\n\u00a0\u00a0\u00a0\u00a0}\u00a0<em>#begin<\/em>\n\u00a0\u00a0\u00a0\u00a0Process\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if\u00a0(Test-Path\u00a0$regpath)\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Write-Verbose\u00a0\"[$((Get-Date).TimeofDay)\u00a0PROCESS]\u00a0Auto\u00a0Hiding\u00a0Windows\u00a010\u00a0TaskBar\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$RegValues\u00a0=\u00a0(Get-ItemProperty\u00a0<em>-Path<\/em>\u00a0$RegPath).Settings\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$RegValues[8]\u00a0=\u00a02\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Set-ItemProperty\u00a0<em>-Path<\/em>\u00a0$RegPath\u00a0<em>-Name<\/em>\u00a0Settings\u00a0<em>-Value<\/em>\u00a0$RegValues\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if\u00a0($PSCmdlet.ShouldProcess(\"Explorer\",\u00a0\"Restart\"))\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<em>#Kill\u00a0the\u00a0Explorer\u00a0process\u00a0to\u00a0force\u00a0the\u00a0change<\/em>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Stop-Process\u00a0<em>-Name<\/em>\u00a0explorer\u00a0<em>-Force<\/em>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Write-Warning\u00a0\"Can't\u00a0find\u00a0registry\u00a0location\u00a0$regpath.\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\n\u00a0\u00a0\u00a0\u00a0}\u00a0<em>#process<\/em>\n\u00a0\u00a0\u00a0\u00a0End\u00a0{\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Write-Verbose\u00a0\"[$((Get-Date).TimeofDay)\u00a0END\u00a0\u00a0\u00a0\u00a0]\u00a0Ending\u00a0$($myinvocation.mycommand)\"\n\u00a0\u00a0\u00a0\u00a0}\u00a0<em>#end<\/em>\n\n}\n\n<\/code><\/pre>\n\n\n\n<p>Because I'm making changes to the registry and killing a process, the functions have support for -WhatIf. Set-ItemProperty will inherit the WhatIf preference. Technically, so will Stop-Process, but I wanted to demonstrate how you can add your own WhatIf handling for commands that don't recognize -WhatIf.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/Enable-AutoHideTaskbar.png\"><img loading=\"lazy\" decoding=\"async\" width=\"831\" height=\"190\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/Enable-AutoHideTaskbar.png\" alt=\"\" class=\"wp-image-8422\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/Enable-AutoHideTaskbar.png 831w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/Enable-AutoHideTaskbar-300x69.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/Enable-AutoHideTaskbar-768x176.png 768w\" sizes=\"auto, (max-width: 831px) 100vw, 831px\" \/><\/a><\/figure>\n\n\n\n<p>The command is written to work locally and only affects the current user. The functions also have aliases that are clearer, and task specific.<\/p>\n\n\n\n<p>You may not need the commands, but I hope there is a technique or concept you find useful.<\/p>\n\n\n\n<p>Now if you'll excuse me, I have <strong><em>got <\/em><\/strong>to get this new course recorded.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I&#8217;m working on a Pluralsight course, I tend to setup a virtual machine for recording. Although, lately I&#8217;ve been trying with Windows 10 Sandbox. This is handy when all I need is a Windows 10 desktop. When I setup the system, I have particular settings I need to configure. Naturally I use a PowerShell&#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 on the blog: Managing the Windows 10 Taskbar with #PowerShell","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,110,8,608],"tags":[224,560],"class_list":["post-8420","post","type-post","status-publish","format-standard","hentry","category-powershell","category-registry","category-scripting","category-windows-10","tag-function","tag-registry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Managing the Windows 10 Taskbar with PowerShell &#8226; The Lonely Administrator<\/title>\n<meta name=\"description\" content=\"I needed to automate the process of hiding the Windows 10 task bar. Here&#039;s how I tweak the registry using PowerShell in a pair of functions.\" \/>\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\/8420\/managing-the-windows-10-taskbar-with-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Managing the Windows 10 Taskbar with PowerShell &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"I needed to automate the process of hiding the Windows 10 task bar. Here&#039;s how I tweak the registry using PowerShell in a pair of functions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-20T18:53:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-20T18:53:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.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\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Managing the Windows 10 Taskbar with PowerShell\",\"datePublished\":\"2021-05-20T18:53:48+00:00\",\"dateModified\":\"2021-05-20T18:53:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/\"},\"wordCount\":382,\"commentCount\":10,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/taskbar-regsettings.png\",\"keywords\":[\"Function\",\"Registry\"],\"articleSection\":[\"PowerShell\",\"Registry\",\"Scripting\",\"Windows 10\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/\",\"name\":\"Managing the Windows 10 Taskbar with PowerShell &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/taskbar-regsettings.png\",\"datePublished\":\"2021-05-20T18:53:48+00:00\",\"dateModified\":\"2021-05-20T18:53:51+00:00\",\"description\":\"I needed to automate the process of hiding the Windows 10 task bar. Here's how I tweak the registry using PowerShell in a pair of functions.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/taskbar-regsettings.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/taskbar-regsettings.png\",\"width\":766,\"height\":201},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8420\\\/managing-the-windows-10-taskbar-with-powershell\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Managing the Windows 10 Taskbar with PowerShell\"}]},{\"@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":"Managing the Windows 10 Taskbar with PowerShell &#8226; The Lonely Administrator","description":"I needed to automate the process of hiding the Windows 10 task bar. Here's how I tweak the registry using PowerShell in a pair of functions.","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\/8420\/managing-the-windows-10-taskbar-with-powershell\/","og_locale":"en_US","og_type":"article","og_title":"Managing the Windows 10 Taskbar with PowerShell &#8226; The Lonely Administrator","og_description":"I needed to automate the process of hiding the Windows 10 task bar. Here's how I tweak the registry using PowerShell in a pair of functions.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/","og_site_name":"The Lonely Administrator","article_published_time":"2021-05-20T18:53:48+00:00","article_modified_time":"2021-05-20T18:53:51+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.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\/8420\/managing-the-windows-10-taskbar-with-powershell\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Managing the Windows 10 Taskbar with PowerShell","datePublished":"2021-05-20T18:53:48+00:00","dateModified":"2021-05-20T18:53:51+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/"},"wordCount":382,"commentCount":10,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png","keywords":["Function","Registry"],"articleSection":["PowerShell","Registry","Scripting","Windows 10"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/","name":"Managing the Windows 10 Taskbar with PowerShell &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png","datePublished":"2021-05-20T18:53:48+00:00","dateModified":"2021-05-20T18:53:51+00:00","description":"I needed to automate the process of hiding the Windows 10 task bar. Here's how I tweak the registry using PowerShell in a pair of functions.","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png","width":766,"height":201},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Managing the Windows 10 Taskbar with PowerShell"}]},{"@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":8424,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8424\/hiding-taskbar-search-with-powershell\/","url_meta":{"origin":8420,"position":0},"title":"Hiding TaskBar Search with PowerShell","author":"Jeffery Hicks","date":"May 21, 2021","format":false,"excerpt":"Yesterday I shared a few PowerShell functions for configuring the Windows 10 taskbar to auto-hide. This works great in my virtual desktop when recording my Pluralsight courses. But even when hidden I would still get an annoying white sliver from the search box. So I got rid of that as\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\/05\/show-searchbox.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/show-searchbox.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/show-searchbox.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/show-searchbox.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8612,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/","url_meta":{"origin":8420,"position":1},"title":"Update Registry OS ProductName with PowerShell","author":"Jeffery Hicks","date":"October 12, 2021","format":false,"excerpt":"I expect many of you are like me and have done, or will do, an in-place upgrade from Windows 10 to Windows 11. It is easy enough to run a PowerShell expression like this to see the operating system name. Get-CimInstance win32_operatingsystem | Select-Object -property Caption I get a value\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\/10\/set-psproduct2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-psproduct2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-psproduct2.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-psproduct2.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7969,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-7\/7969\/deploy-openssh-server-to-windows-10\/","url_meta":{"origin":8420,"position":2},"title":"Deploy OpenSSH Server to Windows 10","author":"Jeffery Hicks","date":"December 16, 2020","format":false,"excerpt":"PowerShell 7 offers a number of compelling reasons to adopt it. One of the best is support for SSH as a PowerShell remoting protocol. Unfortunately, this is not a topic that typically comes up for Windows-centric IT Pros. I know this is definitely true in my case, and a deficiency\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\/sshserver-installed.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/sshserver-installed.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/sshserver-installed.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/sshserver-installed.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/sshserver-installed.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/sshserver-installed.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":5633,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5633\/get-git-with-powershell\/","url_meta":{"origin":8420,"position":3},"title":"Get Git with PowerShell","author":"Jeffery Hicks","date":"August 25, 2017","format":false,"excerpt":"If you are creating PowerShell scripts, tools or modules today, you are most likely using Git. What? You're not? Is it because you haven't gotten around to installing it? I have some \"quick and dirty\" PowerShell hacks to help you out on Windows systems. Linux boys and girls already know\u2026","rel":"","context":"In &quot;Git&quot;","block_context":{"text":"Git","link":"https:\/\/jdhitsolutions.com\/blog\/category\/git\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/08\/image_thumb-8.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/08\/image_thumb-8.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/08\/image_thumb-8.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/08\/image_thumb-8.png?resize=700%2C400 2x"},"classes":[]},{"id":1163,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1163\/join-me-in-atlanta-for-teched-2011\/","url_meta":{"origin":8420,"position":4},"title":"Join Me in Atlanta for TechEd 2011","author":"Jeffery Hicks","date":"February 24, 2011","format":false,"excerpt":"I'm very excited to be presenting at Microsoft TechEd North America 2011, this year in Atlanta, GA. I'll be presenting two breakout sessions and will likely be there most of the week so there will be plenty of time to connect with people. I have what I hope are some\u2026","rel":"","context":"In &quot;Conferences&quot;","block_context":{"text":"Conferences","link":"https:\/\/jdhitsolutions.com\/blog\/category\/conferences\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/TechEd-Atlanta-2011-300x48.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":9130,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9130\/configure-sysinternals-eula-acceptance\/","url_meta":{"origin":8420,"position":5},"title":"Configure SysInternals EULA Acceptance","author":"Jeffery Hicks","date":"August 24, 2022","format":false,"excerpt":"I just saw a very, very handy thing on Twitter where you can set a registry key that will automatically accept all EULA prompts for the SysInternals tools. I know there is a command-line switch I can use, but I never remember to use it. Setting the registry key appears\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":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8420","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=8420"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8420\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=8420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=8420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=8420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}