Solved

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

Posted on 2011-03-11
5
5,030 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
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…
Suggested Courses

635 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