Dim MaLigne
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_TSIssuedLicense",,48)
Wscript.Echo "sIssuedToComputer" & VbTab & "sIssuedToUser" & VbTab & "IssueDate" & VbTab & "LicenseStatus"
For Each objItem in colItems
MaLigne = objItem.sIssuedToComputer & VbTab & objItem.sIssuedToUser & VbTab & objItem.IssueDate & VbTab & objItem.LicenseStatus
Wscript.Echo MaLigne
'Wscript.Echo "-----------------------------------"
'Wscript.Echo "Win32_TSIssuedLicense instance"
'Wscript.Echo "-----------------------------------"
'Wscript.Echo "ExpirationDate: " & objItem.ExpirationDate
'Wscript.Echo "IssueDate: " & objItem.IssueDate
'Wscript.Echo "KeyPackId: " & objItem.KeyPackId
'Wscript.Echo "LicenseId: " & objItem.LicenseId
'Wscript.Echo "LicenseStatus: " & objItem.LicenseStatus
'Wscript.Echo "sHardwareId: " & objItem.sHardwareId
'Wscript.Echo "sIssuedToComputer: " & objItem.sIssuedToComputer
'Wscript.Echo "sIssuedToUser: " & objItem.sIssuedToUser
Next
Lien vers le fichier : cliquez ici
Téléchargement(s)
Nom | Site Web d origine | Description |
---|---|---|
WMICodeCreator.zip | http://www.microsoft.com/en-us... | Explorateur de classes WMI |
Article(s) en relation(s)