Clean registry of computers in network

1

I have a network with mostly Windows 7 machines. I also use Spiceworks and sometimes it doesn't detect when a software application has been removed, because some leftover registry remnants are still present after the uninstall.

Is there any way I can scan the PCs in my network and clean up the registries on each one in an automated fashion?

Moses

Posted 2013-10-29T16:23:40.547

Reputation: 10 813

1If it's a domain network or you have a method to execute scripts, and assuming the registry entries are the same in each case, it should be a simple matter of creating a .reg file with the necessary modifications and executing it on each machine. if the registry entries differ (e.g. machine-unique identifier), then you'll need to do a little more scripting work. – Bob – 2013-10-29T16:34:39.117

@Moses - You should be very careful about "automatic" tools that touch the registry hive. Great way to have unbootable systems or worst, a registry file that is jacked up. Personally the only tool I would trust is ccleaner only because its 100% free and doesn't attempt to push their services as a registry booster – Ramhound – 2013-10-29T16:37:49.363

If you want to create custom scripts for specific tasks you can do that. This way you can validate and verify the system works after the script it ran. – Ramhound – 2013-10-29T16:41:09.850

@Ramhound Yes, I am very wary of anything that claims to "speed up" my PC. I love CCleaner, and they have a network edition that would do exactly what I'm looking for, but unfortunately it is quite expensive. – Moses – 2013-10-29T19:52:22.797

Answers

1

Have a look at this "Hey Scripting Guy" blog article about remote-registry editing with PowerShell. It should get you started!

The particular important bits from this article are these:

$cred = Get-Credential iammred\administrator

Invoke-Command -cn (gc c:\fso\servers.txt) -cred $cred {pushd;sl HKCU:\software; ni HSG; New-ItemProperty -name forscripting -PropertyType string –path hsg -value "powershell rocks" ; popd}
  • servers.txt contains a list of servers on your network
  • iammred\administrator is your domain (or workgroup) credentials
  • HKCU:\software is the registry key path
  • -propertyType is the type of value
  • -value is the value

brandonscript

Posted 2013-10-29T16:23:40.547

Reputation: 536

1

Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.

– Bob – 2013-10-29T16:36:09.030

Normally I would @Bob, however, given that none of the details (registry paths, number of machines, workstation/domain environment) there is simply no more specific information to provide. – brandonscript – 2013-10-29T16:42:07.870

1In that case, consider leaving a comment (e.g. requesting more information) rather than an answer. – Bob – 2013-10-29T16:45:57.863