Aussie owned and operated, with 23+ years of industry experience, Gold Coast InfoTech is delighted to support all of your business technology requirements.

Gallery

Contacts

success@goldcoastinfotech.com.au

1800 291 071

KBArticles Scripts, Commands, Registry Uncategorized

SCRIPT: check Xen servers logons enabled

‘vbscript
const HKEY_LOCAL_MACHINE = &H80000002
Dim oReg, strKeyPath, strValueName, strDisabled, objArgs, strComputer, arrComputers
Set objArgs = WScript.Arguments
arrComputers = Array(“server1″,”server2”)

sOutput = “Logons Enabled(0) or Disabled(1)” & VBCRLF & VBCRLF
For EACH strComputer in arrComputers
 Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\” & strComputer & “rootdefault:StdRegProv”)
 strKeyPath = “SoftwareMicrosoftWindows NTCurrentVersionWinlogon”
 strValueName = “WinStationsDisabled”
 oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strDisabled
 sOutput = sOutput & strcomputer & ”    ” & strDisabled & vbcrlf

On Error Resume Next               
Next
        wscript.echo sOutput

Author

Customer

Leave a comment

Your email address will not be published. Required fields are marked *