Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Help getting registry key value using Credential's

$
0
0

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


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>