Solved

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

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

This article explains how to install and use the NTBackup utility that comes with Windows Server.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

751 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