![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #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 Specs![]() |
![]() |
| 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 | |||