How to use Powershell to replace registry values

Anonymous
2021-12-05T19:18:10.457+00:00

Hi!

I'm trying to replace all instances of "Stanislas" in my computer's registry with "Amelia". The user folder has been renamed so all "C:\Users\Stanislas" are obsolete. Any instances that aren't paths can be changed as well.

I saw there have been posts about this before but the truth is I have no idea what I'm looking at, I know how to feed codes to Powershell (at least I think so, I did successfully change the local user name), but I don't know where to input the strings that apply to me in them.

I'd be very very grateful if someone could take a few minutes to help me with this.
Thank you!

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,462 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,906 Reputation points
    2021-12-05T20:43:49.423+00:00

    I'd be careful with that "Any instances that aren't paths can be changed as well" business!"

    Have a look at this first (no sense reinventing the wheel!): Search-Registry.ps1

    At least get an idea of what might be found before indiscriminately changing everything!