Display: Cloud | List
Most Popular Tags
Results (2 total) All > wmi (x) > terminal-services (x)
ChangeMode sample using PowerShell (ChangeMode method of the Win32_TerminalServiceSetting class (Windows))
# Change-TSMode.ps1# Changes the TS Mode using WMI and PowerShell# thomas lee - tfl@psp.co.uk# first, get the TS Setting object.$ts=get-WMIObject Win32_TerminalServiceSetting -Namespace ROOT\CIMV2\TerminalServices# display current tsmode:"Current Licensing mode is: {0} " -f $ts.LicensingType# save old type away$tsoldlt = $ts.licensingtype# change type$r = $ts.changemode(4)# re-retreive TS object$
Last modified by Thomas Lee on 6/30/2008 3:19:05 PM
GetDomain Method using PowerShell (GetDomain method of the Win32_TerminalServiceSetting class (Windows))
# Get-TSdomain.ps1# Gets the domain name of the domain in which the TS is in# thomas lee - tfl@psp.co.uk # first, get the TS Setting object.$ts=get-WMIObject Win32_TerminalServiceSetting -Namespace ROOT\CIMV2\TerminalServices # now get the domain$domain = $ts.GetDomain() # and display results "The TS Server {0} is in domain: {1}" -f $ts.servername, $domain.domain
Last modified by TOUALBIA.Barbara on 4/28/2008 10:36:55 AM
Page view tracker