Remote Registry PowerShell Module - Shay Levy

Shay Levy

If you repeat it, $CRIPT it!

News



View Shay Levy's profile on LinkedIn Follow Shay Levy at Twitter Shay Levy's Facebook profile Subscribe to my FriendFeed




site statistics




Remote Registry PowerShell Module

 

PSRemoteRegistry

About two years ago I wrote a Stand alone registry functions library to help managing Windows Registry on local or remote computers. Now that PowerShell 2.0 has released, I’ve taken the time to convert the library to Advanced Functions and now they are part of a PowerShell module.

The big improvement in the functions, beside the richness of PowerShell 2.0 features used in the module (support for Common Parameters, Comment Based Help and declaring a function that acts similar to a compiled cmdlet), is that now the functions can be used together in a pipeline. All functions are documented so you can get help (code examples etc) for any function with Get-Help.

The project, PSRemoteRegistry, is released on Microsoft’s MSDN code gallery. Here’s a list of the functions:

Get-RegBinary
Get-RegDefault
Get-RegDWord
Get-RegExpandString
Get-RegKey
Get-RegMultiString
Get-RegQWord
Get-RegString
Get-RegValue
New-RegKey
Remove-RegKey
Remove-RegValue
Set-RegBinary
Set-RegDefault
Set-RegDWord
Set-RegExpandString
Set-RegMultiString
Set-RegQWord
Set-RegString
Test-RegKey
Test-RegValue

I’d love to hear your comments, suggestions, bugs (if you find any), please report them on the project’s Discussions page or in the comments box below.

Comments

uberVU - social comments said:

This post was mentioned on Twitter by bernd_k: RT @mwjcomputing: If you haven't checked out Shay Levy's Remote Registry #PowerShell module, you should. .. http://bit.ly/8DMNN1

# January 10, 2010 6:55 PM

Shay Levy said:

Module authors can use a manifest file for their modules (though they are not required). A manifest file

# January 14, 2010 10:11 AM

Stand alone registry functions library - Shay Levy said:

Pingback from  Stand alone registry functions library - Shay Levy

# January 15, 2010 10:01 AM

Chris said:

I'm tried to do a get-regstring which works fine however I want to either pass a whole OU to it or a txt file with a list of computers, is this possible?

# July 8, 2010 5:51 AM

Chris said:

Sorry, ignore the txt file part, passing a OU to it with get-qadcomputer would be nice

# July 8, 2010 6:02 AM

ScriptFanatic said:

Chris

Here's an example:

Get-QADComputer -SearchRoot 'CN=Computers,DC=domain,DC=com' | Foreach-Object{

Get-RegString -ComputerName $_.Name -Hive LocalMachine -Key ... -Value -Ping

}

# July 8, 2010 9:27 AM

Chris said:

Thats what I was trying but everything returns the doesn't respond to ping message for the whole OU, around 1000 computers so I thought I must of been doing it wrong

# July 8, 2010 11:38 PM

ScriptFanatic said:

Interesting, does this works better?

Get-QADComputer -SearchRoot 'CN=Computers,DC=domain,DC=com' | Where-Object { Test-Connection $_.Name -Count 1 -Quiet} | Foreach-Object{

Get-RegString -ComputerName $_.Name -Hive LocalMachine -Key ... -Value

}

# July 8, 2010 11:46 PM

Chris said:

That seems to work, very slow though

# July 9, 2010 5:08 AM

ScriptFanatic said:

Interesting, the -Ping switch implements the same Test-Connection command:

if($Ping)

{

   Write-Verbose "Parameter [Ping] is presnet, initiating Ping test"

   if( !(Test-Connection -ComputerName $c -Count 1 -Quiet))

   {

       Write-Warning "[$c] doesn't respond to ping."

       return

   }

}

Can you run the commnd you use with the -Verbose parameter. Can you see verbose messages in your console session?

# July 9, 2010 4:23 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: