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

Remote Registry Value with Spaces

$
0
0

I am trying to get the value of this remote registry key. Unfortunately the value has a "space" in it. The value without a space queries fine. What is the correct format to have it not return "Null Expression":

$strMachineName = "$Server"
$objReg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $strMachineName)
$objRegKey= $objReg.OpenSubKey("SYSTEM\\CurrentControlSet\\services\\MSExchangeIS\\ParametersSystem")
$Reg2 = $objRegkey.GetValue("Reread Logon Quotas Interval")


Viewing all articles
Browse latest Browse all 21975

Trending Articles