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

VBScript to check Citrix Logons

This script will run for all listed citrix servers to check if logons are enabled or disabled remotely.
its just a remote registry query coupled with an array, basic but functional.. 🙂

—————————————————————————————————-
‘START SCRIPT
const HKEY_LOCAL_MACHINE = &H80000002
Dim oReg, strKeyPath, strValueName, strDisabled, objArgs, strComputer, arrComputers
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
‘END SCRIPT
—————————————————————————————————-

Author

Customer

Leave a comment

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