I'm wanting to get a registry value from a remote server using certain credential's.
Below is an example of how I can get the OS version
$server = "SERVER" $reg = Get-WmiObject -List -Namespace root\default -cn $server -Credential "Domain\User" | Where-Object {$_.Name -eq "StdRegProv"} $HKLM = 2147483650 $reg.GetStringValue($HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","ProductName").sValue
The one I need to get is the VALUE from the REG_DWORD called "AUOption" which is located in the following location
$reg.GetStringValue($HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update")
Can someone assist me?
Thank you