Solved

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

Posted on 2011-03-11
5
4,633 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 500 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
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 walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

828 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