Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Remote HKU registry values

Reply
 
Old 08-18-2008   #1 (permalink)


Vista Ultimate x32
 
 

Remote HKU registry values

I work in a multiple AD forest environment and quite often have to support clients who have manually mapped drives under their local profiles in addition to their policy mapped ones
When our remote control software fails on machine for some reason and the client is in need of a profile reset it is quite handy to have information about the clients manually mapped drives beforehand so they can be re-mapped for them afterwards.

It is quite easy to query the registry using psexec after determining the logged on users SID, but I am stuck as to which way to proceed after that for individual drive letters.

# Required Info
$domvar = read-host "Domain to Query: "
$usrvar = read-host "UID: "
$pcvar = read-host "PC Name: "


# Get users domain SID
$strusr = new-object system.security.principal.ntaccount ($domvar, $usrvar)
$strsid = $strusr.translate([system.security.principal.securityidentifier])


# Pass values and use PSEXEC to query remote Current User settings
psexec \\$pcvar reg query hku\$strsid\network

from here I am a bit stuck as to the best way to filter out the registry values nice and cleanly however, each drive will be listed as per its drive letter as a subkey, and under each subkey the 'RemotePath' string value specifies the drives UNC path.

Is there an easier way to do this (maybe even without PSEXEC)
Am I going about this the wrong way altogether?

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Set/Create Registry Values PowerShell
Writing values to Registry General Discussion
Reporting on registry values PowerShell
need some registry values Vista General
Access values y registry Keys PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46