How to get serial number

Forums

Forums
Forums, discussions, and Q&A for all products.

How to get serial number

  • How to make agent procedure check the serial number ? from audit?

  • Just use the system variable #vMachine.IpAddress# in your agent procedure.

  • may I know the example?

  • Here we go

    <?xml version="1.0" encoding="utf-8"?>
    <ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">
    <Procedure name="Example - Get SerialNumber from SysVariable" treePres="3" id="1486802209" folderId="688974396506778" treeFullPath="myProcedures - French Pack">
    <Body description="Utiliser une valeur système depuis une vue SQL comme variable">
    <Statement description="Créez une variable de procédure nommée et affectez-y la valeur qui a été récupérée par l''agent auprès de l''ordinateur géré." name="GetVariable" continueOnFail="false">
    <Parameter xsi:type="EnumParameter" name="VariableType" value="SQLView" />
    <Parameter xsi:type="StringParameter" name="SourceContent" value="vMachine/[SysSerialNumber]" />
    <Parameter xsi:type="StringParameter" name="VariableName" value="variable" />
    </Statement>
    <If description="">
    <Condition name="CheckVariable">
    <Parameter xsi:type="StringParameter" name="VariableName" value="#variable#" />
    <Parameter xsi:type="EnumParameter" name="Condition" value="Contains" />
    <Parameter xsi:type="StringParameter" name="Value" value="a" />
    </Condition>
    <Then>
    <Statement description="Display a message dialog to the user." name="SendMessage" continueOnFail="false">
    <Parameter xsi:type="StringParameter" name="Message" value="Serial Number: #variable#" />
    <Parameter xsi:type="BooleanParameter" name="Immediate" value="True" />
    </Statement>
    </Then>
    <Else>
    <Statement description="Display a message dialog to the user." name="SendMessage" continueOnFail="false">
    <Parameter xsi:type="StringParameter" name="Message" value="Serial Number doesn't contains the letter a" />
    <Parameter xsi:type="BooleanParameter" name="Immediate" value="True" />
    </Statement>
    </Else>
    </If>
    </Body>
    </Procedure>
    </ScriptExport>
  • Thank You