Reply To: What do you use to remotely monitor Wyse Thin Clients?

#23393
Avatarab17182
Member
  • Total Post: 9
  • Regular Joe
  • ★★

Here’s a modified snippet of code from one of our PowerShell scripts that uses SNMP to query info from WYSE thin clients:

#– The below assumes you have a value set for $WYSEClientAddress and SNMPUTIL.EXE in c:tools
#– Get the uptime remotely
$WYSEUptimeTimeTicks = c:toolsSNMPUTIL.exe get $WYSEClientAddress SNMPWYSE .1.3.6.1.2.1.1.3.0 | Select-Object -Skip 1 |% {$(($_ -split ‘=’)[1] -replace (‘TimeTicks’,”)).Trim()}
$WYSEUptimeDays = ([datetime]::Now – ([datetime]::Now).AddSeconds(-($WYSEUptimeTimeTicks[0]/100))).days
$WYSEUptimeHours = ([datetime]::Now – ([datetime]::Now).AddSeconds(-($WYSEUptimeTimeTicks[0]/100))).hours
$WYSEUptimeMins = ([datetime]::Now – ([datetime]::Now).AddSeconds(-($WYSEUptimeTimeTicks[0]/100))).minutes
$WYSEUptimeSecs = ([datetime]::Now – ([datetime]::Now).AddSeconds(-($WYSEUptimeTimeTicks[0]/100))).seconds
$WYSEUptime = “$WYSEUptimeDays” + ” days ” + “$WYSEUptimeHours” + ” hours ” + “$WYSEUptimeMins” + ” mins ” + “$WYSEUptimeSecs” + ” secs”

#– Get the NIC speed remotely
$WYSENICSpeed = c:toolsSNMPUTIL.exe get $WYSEClientAddress SNMPWYSE .1.3.6.1.4.1.714.1.2.6.2.4.0 | Select-Object -Skip 1 |% {$(($_ -split ‘=’)[1] -replace (‘String’,”)).Trim()}

#– Get the firmware version remotely
$WYSEfirmware = c:toolsSNMPUTIL.exe get $WYSEClientAddress SNMPWYSE .1.3.6.1.2.1.1.1.0 | Select-Object -Skip 1 |% {$(($_ -split ‘=’)[1] -replace (‘String’,”)).Trim()}

#– Get the INI server details remotely
$WYSEConfigServer = c:toolsSNMPUTIL.exe get $WYSEClientAddress SNMPWYSE .1.3.6.1.4.1.714.1.2.6.2.2.0 | Select-Object -Skip 1 |% {$(($_ -split ‘=’)[1] -replace (‘String’,”)).Trim()}
$WYSEConfigServerPath = c:toolsSNMPUTIL.exe get $WYSEClientAddress SNMPWYSE .1.3.6.1.4.1.714.1.2.6.2.3.0 | Select-Object -Skip 1 |% {$(($_ -split ‘=’)[1] -replace (‘String’,”)).Trim()}

#– Output the details
$WYSEUptime
$WYSENICSpeed
$WYSEfirmware
$WYSEConfigServer
$WYSEConfigServerPath