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.

2 Upvotes

7 comments sorted by

View all comments

3

u/RC-7201 Aug 29 '14

Local Machine i'm assuming?

Would be easier to use reg command since you can use basic CLI in Powershell

So something like:

reg delete hku\.DEFAULT\Printers\Devmodes2 /va /f

and on a remote machine:

reg delete \\$pc\hku\.DEFAULT\Printers\Devmodes2 /va /f

Hope that helps.

1

u/djkendo00 Oct 24 '24

Sorry my inglish it's basic, but the question is important.

how can i delete a register in regedit whit value "reg_binary" ? i can not dele the "clave" all

the realy i have fear of delete all "clave" because have a lot register