Infront EMC Isilon Verify License Task WA

EMC.Isilon.VerifyLicenseTask.WA (WriteActionModuleType)

This WA implements the EMC Isilon MP License verifycation task

Element properties:

TypeWriteActionModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
InputTypeSystem.BaseData
OutputTypeSystem.CommandOutput

Member Modules:

ID Module Type TypeId RunAs 
WA WriteAction Microsoft.Windows.ScriptWriteAction Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
LicenseKeystring$Config/LicenseKey$License KeyLicense Key

Source Code:

<WriteActionModuleType ID="EMC.Isilon.VerifyLicenseTask.WA" Accessibility="Public" Batching="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="LicenseKey" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ManagementPackId" type="xsd:int"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="LicenseKey" Selector="$Config/LicenseKey$" ParameterType="string"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="WA" TypeID="Windows!Microsoft.Windows.ScriptWriteAction">
<ScriptName>VerifyLicenseTask.vbe</ScriptName>
<Arguments>"$Config/LicenseKey$" "$Target/ManagementGroup/Name$" "$Config/ManagementPackId$"</Arguments>
<ScriptBody><Script>'===================================================================
' Infront.EMC.Isilon.VerifyLicense.Task.vbe
' Version: 1.0
'===================================================================

'Option Explicit
SetLocale("en-us")

Const DiscoveryObjectName="Infront.EMC.Isilon.License"
Const DiscoveryObjectEventID=9001
Const DiscoveryObjectScriptName="Infront.EMC.Isilon.VerifyLicense.Task.vbe"

Dim oArgs
Dim strLicenseEndDate, temp, strExtractedManagementGroupName
Dim strLicenseKey, strManagementGroupName
Dim sManagementPackID

Set oArgs = WScript.Arguments

if oArgs.Count &lt;&gt; 3 Then
Wscript.Quit -1
End If

strLicenseKey = oArgs(0)
strManagementGroupName = oArgs(1)
sManagementPackID = oArgs(2)


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 &lt;&gt; "Unlicensed" Then
temp = Decrypt(strLicenseKey,expectedMPName)
LicenseMGName = Split(temp,";;")(0)

strExtractedManagementGroupName = LCase(LicenseMGName)
strManagementGroupName = LCase(strManagementGroupName)

If StrComp(strExtractedManagementGroupName, strManagementGroupName) &lt;&gt; 0 Then
strLicenseKey = "Invalid"
End If
If InStr(temp,";;")&lt;&gt; 0 Then
strLicenseEndDate = Split(temp,";;")(1)
End If
Else
strLicenseEndDate = ""
LicenseMGName = ""
End If

If strLicenseKey &lt;&gt; "Unlicensed" and strLicenseKey &lt;&gt; "Invalid" Then
If CDate(strLicenseEndDate) &gt; 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 : " &amp; expectedMPName
WScript.Echo "License Key Management Pack Name : " &amp; LicenseMPName
WScript.Echo "Expected Management Group Name : " &amp; strManagementGroupName
WScript.Echo "License Key Management Group Name : " &amp; strExtractedManagementGroupName
WScript.Echo "License Key End Date : " &amp; strLicenseEndDate
WScript.Echo "License Key State : " &amp; strLicenseKey
WScript.Echo "License Key Expiration Status : " &amp; strLicExpStatus


#@~^MAIAAA==o!x^DkKxPG+1.XaYc?DDSFX#@#@&amp;@#@&amp;dfbh~Sxn+z~~FXKWkSPd+UjDD~~aBPH+SjDD@#@&amp;P@#@&amp;dg+SjYMPxPrJ@#@&amp;iS+ F+HP',Jnxv|Xb@#@&amp;7n+znKdP{Pq@#@&amp;dSnUUY.P{~d+Uv?DD#@#@&amp;,7?DD~',?O."+\./`?D.b@#@&amp;@#@&amp;doW.~XPxPdnxUY.~:WPq~UYnw,R8@#@&amp;id&amp;0Ptk9c?DDS6BFb~{PJ,EP:t+ @#@&amp;didg+A?O.,'~1A?DD~',JPE@#@&amp;d72^d@#@&amp;idi1+S?D.P{PH+S?O.,[P;4Dv`bk^cHbNv?ODSaBFb#,QPvbd^vHk[cn+z~nnHnGk~8##,HK[P8 b#*@#@&amp;7i2x9~q6@#@&amp;i7F+HnK/~'~FXKWkQF@#@&amp;77&amp;0PFnHnG/,@*,Sn |XP:tU@#@&amp;d7dn+zKK/P{~F@#@&amp;di3UN,q6@#@&amp;P~~,1n6D@#@&amp;i@#@&amp;~,PPHnS?OD{jDD]\D/`gnhUY.#@#@&amp;~~,P@#@&amp;7fmDH2OP{Pg+A/O.@#@&amp;@#@&amp;AUN,s;U1YkGUtYgAAA==^#~@
</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="WA"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.CommandOutput</OutputType>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>