Kaseya Community

Report for new agents <31 days and install keys

  • I need to do a report for agents installed in last 30 days. I can schedule one to run with a view with first check-in time > "20100301 12:00", but I'd have to modify it monthly to be accurate. That's not good enough for me.

    I could do alerts for new agents, but that is instant and not set to every 30 days like I need it.



    The other one is to monitor office keys installed (to see if someone uses a wrong key), but I think I have some macro work to do in Excel. Anyway, I enjoy seeing what you guys know. All these things are great resources for IT. Thank you.

    Legacy Forum Name: Report for new agents
    Legacy Posted By Username: danieldausch
  • danieldausch
    I need to do a report for agents installed in last 30 days. I can schedule one to run with a view with first check-in time > "20100301 12:00", but I'd have to modify it monthly to be accurate. That's not good enough for me. I could do alerts for new agents, but that is instant and not set to every 30 days like I need it. The other one is to monitor office keys installed (to see if someone uses a wrong key), but I think I have some macro work to do in Excel. Anyway, I enjoy seeing what you guys know. All these things are great resources for IT. Thank you.

    I think that two things are in order here, 1) to have a separate reports section and the other I cant remember... darn leprechauns... I'm not sure about your first request but the second I can help you with... maybe I hope that you're running K2.. if not you can find the same script in the older version in the scripts section. Run this script and run a report based on its results. very effective
    <?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="Validate Windows &amp; Office License" treePres="3">
        <Body description="This script validates Windows and Office licenses.&#xD;&#xA;Run the &amp;#34;License Validation&amp;#34; report under Logs to see the license statuses.&#xD;&#xA;&#xD;&#xA;You will need to place this once in your VSASharedFiles folder on your Kaseya Server&#xD;&#xA;mgadiag.exe: http://go.microsoft.com/fwlink/?linkid=56062&#xD;&#xA;&#xD;&#xA;If you require more detail about the results (e.g. &amp;#34;Unsupported OS&amp;#34Wink please see the following website or contact Microsoft:&#xD;&#xA;&#xD;&#xA;http://www.microsoft.com/genuine/downloads/FAQ.aspx&#xD;&#xA;&#xD;&#xA;Thanks to Barry Harriman at Linkware in Australia for the initial idea!&#xD;&#xA;&#xD;&#xA;Benjamin Lavalley&#xD;&#xA;Senior Sales Engineer, Kaseya&#xD;&#xA;benjamin.lavalley@kaseya.com&#xD;&#xA;">
          <If description="This script validates Windows and Office licenses.&#xD;&#xA;Run the &amp;#34;License Validation&amp;#34; report under Logs to see the license statuses.&#xD;&#xA;&#xD;&#xA;You will need to place this once in your VSASharedFiles folder on your Kaseya Server&#xD;&#xA;mgadiag.exe: http://go.microsoft.com/fwlink/?linkid=56062&#xD;&#xA;&#xD;&#xA;If you require more detail about the results (e.g. &amp;#34;Unsupported OS&amp;#34Wink please see the following website or contact Microsoft:&#xD;&#xA;&#xD;&#xA;http://www.microsoft.com/genuine/downloads/FAQ.aspx&#xD;&#xA;&#xD;&#xA;Thanks to Barry Harriman at Linkware in Australia for the initial idea!&#xD;&#xA;&#xD;&#xA;Benjamin Lavalley&#xD;&#xA;Senior Sales Engineer, Kaseya&#xD;&#xA;benjamin.lavalley@kaseya.com&#xD;&#xA;">
            <Condition name="True" />
            <Then>
              <Statement name="GetURL" continueOnFail="false" osType="Windows">
                <Parameter xsi:type="StringParameter" name="URL" value="http://go.microsoft.com/fwlink/?linkid=52012" />
                <Parameter xsi:type="StringParameter" name="ResponseFileName" value="#vAgentConfiguration.agentTempDir#\mgadiag.exe" />
                <Parameter xsi:type="BooleanParameter" name="WaitComplete" value="True" />
              </Statement>
              <Statement name="ExecuteFile" continueOnFail="false" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\mgadiag.exe" />
                <Parameter xsi:type="StringParameter" name="Arguments" value="/f #vAgentConfiguration.agentTempDir#\licenseresults.txt" />
                <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                <Parameter xsi:type="BooleanParameter" name="WaitComplete" value="True" />
              </Statement>
              <Statement name="GetFile" continueOnFail="false" osType="Windows">
                <Parameter xsi:type="StringParameter" name="RemoteFileName" value="#vAgentConfiguration.agentTempDir#\licenseresults.txt" />
                <Parameter xsi:type="StringParameter" name="KServerFileName" value="..\Docs\Audit\licenseresults-0.txt" />
                <Parameter xsi:type="EnumParameter" name="Action" value="OverwriteNoAlert" />
              </Statement>
              <Statement name="GetURL" continueOnFail="false" osType="Windows">
                <Parameter xsi:type="StringParameter" name="URL" value="http://files.kaseya.com/sftp/readlicense.vbs" />
                <Parameter xsi:type="StringParameter" name="ResponseFileName" value="#vAgentConfiguration.agentTempDir#\readlicense.vbs" />
                <Parameter xsi:type="BooleanParameter" name="WaitComplete" value="True" />
              </Statement>
              <Statement name="ExecuteFile" continueOnFail="false" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Path" value="%windir%\system32\wscript.exe" />
                <Parameter xsi:type="StringParameter" name="Arguments" value="&amp;#34;#vAgentConfiguration.agentTempDir#\readlicense.vbs&amp;#34; #vAgentConfiguration.agentTempDir#\licenseresults.txt" />
                <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                <Parameter xsi:type="BooleanParameter" name="WaitComplete" value="True" />
              </Statement>
              <Statement name="GetVariable" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />
                <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Kaseya\Kaseya Agent\WindowsLicenseValid" />
                <Parameter xsi:type="StringParameter" name="VariableName" value="windowsstatus" />
              </Statement>
              <Statement name="GetVariable" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />
                <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Kaseya\Kaseya Agent\WindowsLicenseType" />
                <Parameter xsi:type="StringParameter" name="VariableName" value="licensetype" />
              </Statement>
              <Statement name="GetVariable" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />
                <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Kaseya\Kaseya Agent\OfficeLicenseValid" />
                <Parameter xsi:type="StringParameter" name="VariableName" value="officestatus" />
              </Statement>
              <Statement name="GetVariable" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />
                <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Kaseya\Kaseya Agent\Officename" />
                <Parameter xsi:type="StringParameter" name="VariableName" value="officename" />
              </Statement>
              <Statement name="GetVariable" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />
                <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Kaseya\Kaseya Agent\WindowsName" />
                <Parameter xsi:type="StringParameter" name="VariableName" value="windowsName" />
              </Statement>
              <Statement name="GetVariable" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />
                <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Kaseya\Kaseya Agent\WindowsKey" />
                <Parameter xsi:type="StringParameter" name="VariableName" value="windowskey" />
              </Statement>
              <Statement name="WriteScriptLogEntry" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Comment" value="Windows License Key Status: #windowsstatus#" />
              </Statement>
              <Statement name="WriteScriptLogEntry" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Comment" value="Windows License Key Type: #licensetype#" />
              </Statement>
              <Statement name="WriteScriptLogEntry" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Comment" value="Windows License Key: #windowskey#" />
              </Statement>
              <Statement name="WriteScriptLogEntry" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Comment" value="Windows License Key Version: #vMachine.OsType# #vMachine.OsInfo#" />
              </Statement>
              <Statement name="WriteScriptLogEntry" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Comment" value="Office License Key Status: #officestatus#" />
              </Statement>
              <Statement name="WriteScriptLogEntry" continueOnFail="true" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Comment" value="Office License Key Version: #officename#" />
              </Statement>
              <Statement name="GetFile" continueOnFail="false" osType="Windows">
                <Parameter xsi:type="StringParameter" name="RemoteFileName" value="#vAgentConfiguration.agentTempDir#\licenseresults.txt" />
                <Parameter xsi:type="StringParameter" name="KServerFileName" value="..\Docs\Audit\licenseresults-1.txt" />
                <Parameter xsi:type="EnumParameter" name="Action" value="OverwriteNoAlert" />
              </Statement>
              <Statement name="WriteScriptLogEntry" continueOnFail="false" osType="MacOS">
                <Parameter xsi:type="StringParameter" name="Comment" value="Mac OS X license validation not supported." />
              </Statement>
              <Statement name="DeleteFile" continueOnFail="false" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\mgadiag.exe" />
              </Statement>
              <Statement name="DeleteFile" continueOnFail="false" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\readlicense.vbs" />
              </Statement>
              <Statement name="DeleteFile" continueOnFail="false" osType="Windows">
                <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\readlicense.vbs" />
              </Statement>
            </Then>
          </If>
        </Body>
      </Procedure>
    </ScriptExport>
    


    Legacy Forum Name: How-To,
    Legacy Posted By Username: thirteentwenty



    [edited by: Brendan Cosgrove at 5:37 PM (GMT -8) on 12-20-2010] .
  • That is so not importing for me :<

    Legacy Forum Name: How-To,
    Legacy Posted By Username: danieldausch
  • [quote user="danieldausch"]That is so not importing for me :

    What version of Kaseya are you using?

    Legacy Forum Name: How-To,
    Legacy Posted By Username: thirteentwenty
  • Version Number: 2008 (SP1) - 5.1.0.0

    Legacy Forum Name: How-To,
    Legacy Posted By Username: danieldausch
  • danieldausch
    Version Number: 2008 (SP1) - 5.1.0.0


    Search the scripts thread, the original for your version of Kaseya is in there some where.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: thirteentwenty
  • Hey, thanks very much. I am experimenting with this to see how I can make it work for us. I'm still wondering how I can do Agents with first checkin of "20100301 12:00"

    Legacy Forum Name: How-To,
    Legacy Posted By Username: danieldausch
  • I know this is an old posting, but I am new to Kaseya and I would like to know how to create a report based on this information gathered from this script.