PS Script to delete Registry Values

Welcome Forums General PowerShell Q&A PS Script to delete Registry Values

Viewing 1 reply thread
  • Author
    • #257027
      Topics: 1
      Replies: 0
      Points: 11
      Rank: Member

      I have an issue with a Dell server that was put into production using a factory image. The image appears to have references to¬† the German language pack, and it is causing issues now with updates and adding features. I converted the server to a VHDX and loaded it into hyper-v so I can experiment in a test environment. In my test lab I am able to fix my issues by manually deleting all the registry values in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackageDetect that contain de-DE (package references for the German language). There are hundreds of these, and it takes a long time to do this manually. Is there a way to use PS to go through PackageDetect, find all entries that contain de-DE, and delete those values? I only want to delete value’s not keys. I am guessing that I need to use wildcards. Any pointers would be greatly appreciated, as I am no PS expert!

    • #257042
      Topics: 0
      Replies: 81
      Points: 362
      Helping Hand
      Rank: Contributor

      You can do the following and just remove -WhatIf if you are happy with the results:


Viewing 1 reply thread
  • You must be logged in to reply to this topic.