Returns information about the Terminal Service client settings and policies configured on a computer.

This script was tested using Python 2.2.2-224 for Microsoft Windows, available from ActiveState.

import win32com.client
strComputer = "."
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
objSWbemServices = objWMIService.ConnectServer(strComputer,"root\cimv2")
colItems = objSWbemServices.ExecQuery("Select * from Win32_TSClientSetting")
for objItem in colItems:
    print "Audio Mapping: ", objItem.AudioMapping
    print "Caption: ", objItem.Caption
    print "Clipboard Mapping: ", objItem.ClipboardMapping
    print "Color Depth: ", objItem.ColorDepth
    print "Color Depth Policy: ", objItem.ColorDepthPolicy
    print "COM Port Mapping: ", objItem.COMPortMapping
    print "Connect Client Drives At Logon: ", objItem.ConnectClientDrivesAtLogon
    print "Connection Policy: ", objItem.ConnectionPolicy
    print "Connect Printer At Logon: ", objItem.ConnectPrinterAtLogon
    print "Default To Client Printer: ", objItem.DefaultToClientPrinter
    print "Description: ", objItem.Description
    print "Drive Mapping: ", objItem.DriveMapping
    print "LPT Port Mapping: ", objItem.LPTPortMapping
    print "Setting ID: ", objItem.SettingID
    print "Terminal Name: ", objItem.TerminalName
    print "Windows Printer Mapping: ", objItem.WindowsPrinterMapping