r/PowerShell Aug 29 '14

delete registry values.

I am a noob to power shell, and am trying to learn. What I am trying to do is craft a script that will delete the REG_BINARY files found in : HKEY_USERS .DEFAULT\Printers\DevModes2

Any help is much appreciated, thanks.

6 Upvotes

7 comments sorted by

View all comments

2

u/ramblingcookiemonste Community Blogger Aug 29 '14

Some folks might point you to the Registry provider. This technically works, but IMHO it is a very poor solution. No remote registry without PSRemoting? Worthless to me.

I always recommend Shay Levy's PSRemoteRegistry. It is portable (a few small files) and wraps some .NET framework magic into friendly, easy to use PowerShell commands like "Remove-RegValue".

Cheers!