Quantcast
Channel: THWACK: Popular Discussions - Script Lab
Viewing all articles
Browse latest Browse all 9937

Powershell Monitor not going past Initial Poll

$
0
0

I have a pretty simple Powershell script that isn't going past the initial poll but it tests out sucessfully, what could be the problem?

 

Monitor:

$WarningPreference = "SilentlyContinue"

$StrKey = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

$StrValueName = "WinStationsDisabled"

$strMachineName = "${Node.Caption}"

 

$objReg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $strMachineName)

$objRegKey= $objReg.OpenSubKey($StrKey)

$strValue = $objRegKey.GetValue($StrValueName)

 

$strMsg="Statistic: " + $strValue

Write-Host $strMsg

exit 0


Viewing all articles
Browse latest Browse all 9937

Trending Articles



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