I know this thread is a bit old, but for those of you who find this and wonder if there was a solution, this is what works for me.
<code> import win32com.client from win32com.client import GetObject licenseState = ['Unknown','Temperary','Active','Upgraded','Revoked','Pending','Concurrent'] computer = "YourComputerName" nt = GetObject(r"winmgmts:{impersonationLevel=impersonate}!\\%s\root\cimv2"%computer) licenses = nt.ExecQuery("Select * from Win32_TSIssuedLicense") for license in licenses: print license.sIssuedToComputer, licenseState[license.LicenseStatus] </code> -- View this message in context: http://python.6.n6.nabble.com/WMI-and-Terminal-Services-tp1956950p3884176.html Sent from the Python - python-win32 mailing list archive at Nabble.com. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32