Solved

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

Posted on 2011-03-11
5
4,216 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
Comment Utility
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 500 total points
Comment Utility
... 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
Comment Utility
ok i will test
0
 
LVL 14

Expert Comment

by:Shabarinath Ramadasan
Comment Utility
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
Comment Utility
Thanks its wor
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now