Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Powershell script for Remote registry access and export registry keys informations to a csv file

Posted on 2011-03-11
5
Medium Priority
?
5,417 Views
Last Modified: 2012-05-11
Hi,

I need a script to Export all keys and Data for this registry keys remotely:

       -HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\table pc
        -HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\table pc

The script must check a txt file contain a list of server like this:

Server1
server2
server3
......

i need a csv file with result.

Thanks if you can help me.
0
Comment
Question by:cawasaki
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:daveTechSearch
ID: 35131375
You will not be able to export anything remotely for HKCU.  It has to be done by who ever is currently logged onto the box.

As for HKLM... check this link out:
http://pscx.codeplex.com/wikipage?title=Export-Registry%20Cmdlet
0
 
LVL 5

Accepted Solution

by:
daveTechSearch earned 2000 total points
ID: 35131864
... furthermore... you have access to 'reg query' to query the remote registry in PowerShell... but this will not output to a CSV...

example of output is using out-file currently... but a starting point for you...


foreach($comp in (get-content c:\temp\servers.txt)){
write-output '---------------------------------' | out-file -append c:\temp\export.log
write-output $comp | out-file -append c:\temp\export.log
write-output '---------------------------------' | out-file -append c:\temp\export.log
reg query \\$comp\HKLM\Software\TrendMicro /s |out-file -append c:\temp\export.log
}

Open in new window

0
 

Author Comment

by:cawasaki
ID: 35132000
ok i will test
0
 
LVL 14

Expert Comment

by:Shabarinath Ramadasan
ID: 35136038
Powershell module for registry edit is available.
http://archive.msdn.microsoft.com/PSRemoteRegistry

You can try using Get-RegValue

Goodluck
Shaba
0
 

Author Closing Comment

by:cawasaki
ID: 35136872
Thanks its wor
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question