{"id":8612,"date":"2021-10-12T11:21:53","date_gmt":"2021-10-12T15:21:53","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=8612"},"modified":"2021-10-15T11:14:33","modified_gmt":"2021-10-15T15:14:33","slug":"update-registry-os-productname-with-powershell","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/","title":{"rendered":"Update Registry OS ProductName with PowerShell"},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">Get-CimInstance win32_operatingsystem | Select-Object -property Caption<\/code><\/pre>\n\n\n\n<p>I get a value like Windows 11 Pro. However, operating system information is also stored in the registry under HKLM:\\SOFTWARE\\Microsoft\\Windows&nbsp;NT\\CurrentVersion.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06.png\"><img loading=\"lazy\" decoding=\"async\" width=\"858\" height=\"153\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06.png\" alt=\"\" class=\"wp-image-8613\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06.png 858w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06-300x53.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06-768x137.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06-850x152.png 850w\" sizes=\"auto, (max-width: 858px) 100vw, 858px\" \/><\/a><\/figure>\n\n\n\n<p>The upgrade process doesn't appear to update the ProductName value. Without getting into the merits of the \"best\" way to get operating system information, I simply want to revise this registry setting. Naturally, I want to use PowerShell to automate this simple task because I will have several machines I will need to update.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Getting Information<\/h2>\n\n\n\n<p>First, I want a simple PowerShell function to provide information based on current registry values.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">Function Get-OSProduct {\n    [CmdletBinding()]\n    Param()\n\n    $reg = Get-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n    [PSCustomObject]@{\n        Computername   = $env:computername\n        ProductName    = $reg.Productname\n        Build          = \"{0}.{1}\" -f $reg.CurrentBuildNumber,$reg.UBR\n        Edition        = $reg.EditionID\n        DisplayVersion = $reg.DisplayVersion\n        Installed      = (Get-Date 1\/1\/1970).AddSeconds($reg.InstallDate)\n    }\n}<\/code><\/pre>\n\n\n\n<p>Loading this into my PowerShell session gives me this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/get-osproduct.png\"><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"330\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/get-osproduct.png\" alt=\"\" class=\"wp-image-8614\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/get-osproduct.png 734w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/get-osproduct-300x135.png 300w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/a><\/figure>\n\n\n\n<p>As far as I can tell, the Installed date is when I ran the Windows 11 upgrade on my ThinkPad. The Build property I constructed from two registry values to reflect the same information I get when running winver.exe.  Some might argue that Windows 11 is really Windows 10.5 but since that isn't a legitimate value, I want to update the registry ProductName value with the value I get from Get-CimInstance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting the Value<\/h2>\n\n\n\n<p><strong>Update 15 Oct 2021<\/strong> <em>It turns out that this particular registry value as I'm about to change is not persistent. Windows will change the ProductName back to Windows 10 on a reboot. Still, you might find the code useful as an example of modifying other registry settings.<\/em><\/p>\n\n\n\n<p>This is pretty simple to accomplish.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">Function Set-OSProductName {\n    [cmdletbinding(SupportsShouldProcess)]\n    Param()\n\n    #save the registry path to a variable to keep code easier to read\n    $regPath = 'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n\n    #get OS name from CIM\n    $os = Get-CimInstance -ClassName Win32_OperatingSystem -Property Caption\n    Write-Verbose \"Detected operatings system $($os.caption)\"\n\n    #get current value\n    $current = Get-ItemPropertyValue -Path $regPath -Name ProductName\n    Write-Verbose \"Current product name is $current\"\n\n    #update the registry value\n    #I'm creating my own -whatif code\n    if ($pscmdlet.ShouldProcess($regpath,\"Update ProductName from $current to $($os.caption)\")) {\n        Set-ItemProperty -Path $regPath -Name ProductName -Value $os.Caption\n    }\n}<\/code><\/pre>\n\n\n\n<p>Because I'm updating the registry this needs to be run in an elevated session. I've also added support for -Whatif by specifying SupportsShouldProcess in the cmdletbinding attribute. I could have let Set-ItemProperty automatically detect -WhatIf, but I decided I wanted to write my own Whatif handler to use a more detailed message.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-osproduct.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"170\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-osproduct-1024x170.png\" alt=\"\" class=\"wp-image-8616\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-osproduct-1024x170.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-osproduct-300x50.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-osproduct-768x128.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-osproduct-1536x256.png 1536w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-osproduct-850x141.png 850w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-osproduct.png 1911w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>I''ll re-run the command and in a flash, I've updated the registry.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-psproduct2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"327\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-psproduct2.png\" alt=\"\" class=\"wp-image-8617\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-psproduct2.png 729w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/set-psproduct2-300x135.png 300w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>My intention in this article isn't to debate the merits of getting operating system information from CIM or the Registry. You might have a compelling use case unique to your environment that dictates one over the other. Or perhaps you simply wanted a little guidance on how to use PowerShell to update the registry. These functions are designed to be run locally. However, you could modify them to use PowerShell remoting and work on remote computers. But I'll leave those modifications to you,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. I get a value like Windows 11 Pro. However, operating system information is also stored&#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: Update Registry OS ProductName 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,215],"tags":[387,224,534,560],"class_list":["post-8612","post","type-post","status-publish","format-standard","hentry","category-powershell","category-windows-it-pro","tag-cim","tag-function","tag-powershell","tag-registry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Update Registry OS ProductName with PowerShell &#8226; The Lonely Administrator<\/title>\n<meta name=\"description\" content=\"Here&#039;s how I updated my registry using PowerShell to better reflect my update to Windows 11 based on CIM\/WMI values.\" \/>\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\/8612\/update-registry-os-productname-with-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Update Registry OS ProductName with PowerShell &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Here&#039;s how I updated my registry using PowerShell to better reflect my update to Windows 11 based on CIM\/WMI values.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-12T15:21:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-15T15:14:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06.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=\"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\\\/8612\\\/update-registry-os-productname-with-powershell\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Update Registry OS ProductName with PowerShell\",\"datePublished\":\"2021-10-12T15:21:53+00:00\",\"dateModified\":\"2021-10-15T15:14:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/\"},\"wordCount\":428,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/2021-10-11_9-32-06.png\",\"keywords\":[\"CIM\",\"Function\",\"PowerShell\",\"Registry\"],\"articleSection\":[\"PowerShell\",\"Windows IT Pro\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/\",\"name\":\"Update Registry OS ProductName with PowerShell &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/2021-10-11_9-32-06.png\",\"datePublished\":\"2021-10-12T15:21:53+00:00\",\"dateModified\":\"2021-10-15T15:14:33+00:00\",\"description\":\"Here's how I updated my registry using PowerShell to better reflect my update to Windows 11 based on CIM\\\/WMI values.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/2021-10-11_9-32-06.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/2021-10-11_9-32-06.png\",\"width\":858,\"height\":153},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8612\\\/update-registry-os-productname-with-powershell\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update Registry OS ProductName 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":"Update Registry OS ProductName with PowerShell &#8226; The Lonely Administrator","description":"Here's how I updated my registry using PowerShell to better reflect my update to Windows 11 based on CIM\/WMI values.","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\/8612\/update-registry-os-productname-with-powershell\/","og_locale":"en_US","og_type":"article","og_title":"Update Registry OS ProductName with PowerShell &#8226; The Lonely Administrator","og_description":"Here's how I updated my registry using PowerShell to better reflect my update to Windows 11 based on CIM\/WMI values.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/","og_site_name":"The Lonely Administrator","article_published_time":"2021-10-12T15:21:53+00:00","article_modified_time":"2021-10-15T15:14:33+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06.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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Update Registry OS ProductName with PowerShell","datePublished":"2021-10-12T15:21:53+00:00","dateModified":"2021-10-15T15:14:33+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/"},"wordCount":428,"commentCount":7,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06.png","keywords":["CIM","Function","PowerShell","Registry"],"articleSection":["PowerShell","Windows IT Pro"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/","name":"Update Registry OS ProductName with PowerShell &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06.png","datePublished":"2021-10-12T15:21:53+00:00","dateModified":"2021-10-15T15:14:33+00:00","description":"Here's how I updated my registry using PowerShell to better reflect my update to Windows 11 based on CIM\/WMI values.","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/10\/2021-10-11_9-32-06.png","width":858,"height":153},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8612\/update-registry-os-productname-with-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Update Registry OS ProductName 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":1163,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1163\/join-me-in-atlanta-for-teched-2011\/","url_meta":{"origin":8612,"position":0},"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":8420,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8420\/managing-the-windows-10-taskbar-with-powershell\/","url_meta":{"origin":8612,"position":1},"title":"Managing the Windows 10 Taskbar with PowerShell","author":"Jeffery Hicks","date":"May 20, 2021","format":false,"excerpt":"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.\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\/taskbar-regsettings.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/taskbar-regsettings.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1454,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1454\/teched-atlanta-managing-the-registry-with-powershell\/","url_meta":{"origin":8612,"position":2},"title":"TechEd Atlanta &#8211; Managing the Registry with PowerShell","author":"Jeffery Hicks","date":"May 23, 2011","format":false,"excerpt":"My second TechEd talk was about managing the registry with Windows PowerShell. If you were in the session you know that I stressed heavily using the PowerShell provider and cmdlets. For remote computers, leverage PowerShell's remoting infrastructure. But I also discussed using the \"raw\" .NET classes as well as WMI\u2026","rel":"","context":"In &quot;Conferences&quot;","block_context":{"text":"Conferences","link":"https:\/\/jdhitsolutions.com\/blog\/category\/conferences\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":953,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/953\/test-registry-item\/","url_meta":{"origin":8612,"position":3},"title":"Test Registry Item","author":"Jeffery Hicks","date":"October 4, 2010","format":false,"excerpt":"I've been doing some work lately involving the registry and Windows PowerShell. One of the tasks was to create new registry keys and entries. But because I wanted to some robustness, I wanted a way to verify if a given key or entry already existed. Using Get-ItemProperty is the easy\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":49,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/49\/reading-the-registry-in-powershell\/","url_meta":{"origin":8612,"position":4},"title":"Reading the Registry in PowerShell","author":"Jeffery Hicks","date":"August 26, 2006","format":false,"excerpt":"One of the great PowerShell features is that it treats the registry like any other location or directory. In PowerShell you can connect directly to the registry and navigate the key hierarchy just as if it as a logical drive with folders. I have a very brief demonstration script you\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":7447,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7447\/get-installed-powershell-versions\/","url_meta":{"origin":8612,"position":5},"title":"Get Installed PowerShell Versions","author":"Jeffery Hicks","date":"May 7, 2020","format":false,"excerpt":"As is the norm for a typical day, I was working on one thing when I was distracted by a shiny rabbit hole (to mix some metaphors). Half a day later I have a new PowerShell function that not only might you find useful, but I think it has some\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\/get-psinstalled-result2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/get-psinstalled-result2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/get-psinstalled-result2.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/get-psinstalled-result2.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/get-psinstalled-result2.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/get-psinstalled-result2.png?resize=1400%2C800&ssl=1 4x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8612","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=8612"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8612\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=8612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=8612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=8612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}