1
I have a set of "Registry Hive Files (.)" that am attempting to import via PowerShell. The goal is to have the script run across many machines in the environment and not have to manually do it via RegEdit on each machine.
Is there a way to import hive files via PowerShell?
Trying "regedit.exe hivefile" does not work. These hive files are going in HKLM.
1The answer will depend a little bit on your environment. Basically the way I do this typically is to remotely execute *reg.exe /I <FILENAME>*. How you remotely execute it depends on your environment. If you have remoting available on all the remote machines you can use Enter-PSSession. If not you could use a utility like pscexec.exe – EBGreen – 2015-11-18T21:08:54.800
1Are you on a domain? If so, use Group Policy Preferences instead. Or perhaps just use standard Group Policies and a computer start-up script containing a one-line batch
reg import yourfile.reg
orregedit /s yourfile.reg
. – Ƭᴇcʜιᴇ007 – 2015-11-18T21:29:56.850Also, you say "Trying "regedit.exe hivefile" does not work." In what way does it "not work"? – Ƭᴇcʜιᴇ007 – 2015-11-18T21:31:24.257