Merge Windows Registry key on remote Computers via a Script

jskfan
jskfan used Ask the Experts™
on
Merge Windows Registry key on remote Computers via a Script

I have a CSV file that has the names of Computer Names.
I need WIndows Batch or Powershell or VB Script  that can Merge the Registry key below with the Registry on each computer on CSV file.

Thank you

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Messaging and Directory Services
Commented:
Right click registry entry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports
and click Export and save to "\\server\share\regFile.reg"

create a csv with column Name as COMPUTERNAME with computer names  and save  as C:\CsvFile.csv

then run the below command with proper rights

import-csv C:\CSVFILE.csv | % { Invoke-Command -ComputerName $($_.COMPUTERNAME) -ScriptBlock { copy "\\server\share\regFile.reg" $env:temp ;  reg.exe import $env:temp\regFile.reg }  }

Open in new window

Author

Commented:
Thank you very much!
I will try it later.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial