Category: Registry

RegistrySystems

Query Remote Registry for Key Value

# Open the specified Registry Hive on a remote machine specified. LocalMachine = HKLM / CurrentUser = HKCU $computer = 'localhost' $w32reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$computer) # Open the specific registry key (exclude hive from path) $keypath = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI' $SubKey = $w32reg.OpenSubKey($keypath) # Return data for a specific value $SubKey.GetValue('LastLoggedOnUser') # List all values $SubKey.GetValueNames() # Return data for all values to...