Helpforsure

Microsoft Windows Experts

Retrieve Terminal Services Licensing Grace Period Days info via WMI January 25, 2011


Script to retrieve the number of days left in your TS Licensing Grace Period:
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\CIMV2\TerminalServices”)
‘ Obtain an instance of the the class
‘ using a key property value. (more…)

 

Set Relative Weight in a Terminal Services Session Directory/Broker based Farm via WMI


Script to set a Relative weight value of 100 in a Terminal Services Session Directory/Broker based Farm via a Script:

=========================

Set Relative Weight to a TS Farm

=========================
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\CIMV2\TerminalServices”)
‘ Obtain an instance of the the class
‘ using a key property value.
Set objShare = objWMIService.Get(“Win32_TSSessionDirectory”) (more…)