Dim expectedMPName, LicenseMPName, strLicExpStatus
Select Case sManagementPackID
Case "1" 'Alerts Triage
expectedMPName = "Infront.AlertsTriage"
Case "2" 'Audit
expectedMPName = "Infront.Audit"
Case "3" 'Advanced Server
expectedMPName = "Infront.AdvancedServer"
Case "4" 'McAfee
expectedMPName = "Infront.McAfee"
Case "5" 'McAfee Extended
expectedMPName = "Infront.McAfee.Extended"
Case "6" 'RightFax
expectedMPName = "Infront.RightFax"
Case "7" 'EMC Isilon
expectedMPName = "Infront.EMC.Isilon"
Case "8" 'Orchestrator
expectedMPName = "Infront.SCOrchestrator"
Case "9" 'MP Support
expectedMPName = "Infront.MPSupport"
End Select
If strLicenseKey <> "Unlicensed" Then
temp = Decrypt(strLicenseKey,expectedMPName)
LicenseMGName = Split(temp,";;")(0)
If StrComp(strExtractedManagementGroupName, strManagementGroupName) <> 0 Then
strLicenseKey = "Invalid"
End If
If InStr(temp,";;")<> 0 Then
strLicenseEndDate = Split(temp,";;")(1)
End If
Else
strLicenseEndDate = ""
LicenseMGName = ""
End If
If strLicenseKey <> "Unlicensed" and strLicenseKey <> "Invalid" Then
If CDate(strLicenseEndDate) > Date() Then
strLicExpStatus = "MP License OK"
Else
strLicExpStatus = "MP License Expired"
End If
Else
strLicExpStatus = "Unlicensed or Invalid License Key Detected"
End If
'Results
WScript.Echo "Task : MP Support License"
WScript.Echo "Expected Management Pack Name : " & expectedMPName
WScript.Echo "License Key Management Pack Name : " & LicenseMPName
WScript.Echo "Expected Management Group Name : " & strManagementGroupName
WScript.Echo "License Key Management Group Name : " & strExtractedManagementGroupName
WScript.Echo "License Key End Date : " & strLicenseEndDate
WScript.Echo "License Key State : " & strLicenseKey
WScript.Echo "License Key Expiration Status : " & strLicExpStatus