Happy Independence Day from all of us at the Connect IT Community! Our US offices will be closed on Monday, July 4th, 2022 in recognition of the holiday. Limited Support staff in the US will be on-call and available for critical Service(s) Down issues only. Normal Support operations in the US will resume on Tuesday, July 5th, 2022.

Custom field with Monitor Audit info

Martijn Westers
Martijn Westers Member CHOCOLATE MILK
edited January 24 in Request
I found a procedure which can "detect" a monitor attached to the system and send that information to an email. However I would like part of that info to be in a Custom Field.
0
0 votes

Shipped · Last Updated

solution provided by Pieter Jorritsma

0
0 votes

Needs Review · Last Updated

Comments

  • Pieter Jorritsma
    Pieter Jorritsma Member DECAF
    edited October 2020

    Which procedure do you use and what part do you want?

  • Martijn Westers
    Martijn Westers Member CHOCOLATE MILK
    edited October 2020

    Hi Pieter!

    I'll copy the script below : It does require two files but i don't think they will be hard to find.

    And from the results from the output.txt file I would like the info of the type of monitor to be send to an custom field.

    Monitor Name      : HP E232

    ManufacturerID    : 61474

    Maximum Resolution: 1920 X 1080

    En als er een tweede of derde monitor is dan mogelijk gescheiden met een komma...
    Monitor Name      : HP E232, HP E232, none

    I'll post an example output below the script.

    "); vertical-align: bottom; height: 10px;"><Procedure name="Audit Monitor Information and Specs" treePres="3" id="1189346724" folderId="469415145492848" treeFullPath="WAC PRODUKTIE.Info">
    "); vertical-align: bottom; height: 10px;"><Body description="gathers information about user's monitors and emails it back to you. Script is silent. If no user is logged in then it will delay 30 minutes and try again. ">
    "); vertical-align: bottom; height: 10px;"><If description="">
    "); vertical-align: bottom; height: 10px;"><Condition name="UserIsLoggedIn">
    <Parameter xsi:type="StringParameter" name="UserName" value=""/>
    </Condition>
    "); vertical-align: bottom; height: 10px;"><Then>
    "); vertical-align: bottom; height: 10px;"><Statement name="WriteFile" continueOnFail="false">
    <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\monitorinfoview.chm"/>
    <Parameter xsi:type="StringParameter" name="ManagedFile" value="VSASharedFiles\WAC PRODUKTIE\audit_monitor_info\MonitorInfoView.chm"/>
    <Parameter xsi:type="BooleanParameter" name="DeleteAfter" value="False"/>
    </Statement>
    "); vertical-align: bottom; height: 10px;"><Statement name="WriteFile" continueOnFail="false">
    <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\monitorinfoview.exe"/>
    <Parameter xsi:type="StringParameter" name="ManagedFile" value="VSASharedFiles\WAC PRODUKTIE\audit_monitor_info\MonitorInfoView.exe"/>
    <Parameter xsi:type="BooleanParameter" name="DeleteAfter" value="False"/>
    </Statement>
    "); vertical-align: bottom; height: 10px;"><Statement name="PauseScript" continueOnFail="false">
    <Parameter xsi:type="IntegerParameter" name="Seconds" value="2"/>
    </Statement>
    "); vertical-align: bottom; height: 10px;"><Statement name="ExecuteShellCommand" continueOnFail="false">
    <Parameter xsi:type="StringParameter" name="Command" value="#vAgentConfiguration.agentTempDir#\monitorinfoview.exe /stext #vAgentConfiguration.agentTempDir#\output.txt /HideInactiveMonitors 1"/>
    <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User"/>
    <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False"/>
    </Statement>
    "); vertical-align: bottom; height: 10px;"><Statement name="PauseScript" continueOnFail="false">
    <Parameter xsi:type="IntegerParameter" name="Seconds" value="5"/>
    </Statement>
    "); vertical-align: bottom; height: 10px;"><Statement name="GetVariable" continueOnFail="false">
    <Parameter xsi:type="EnumParameter" name="VariableType" value="FileContent"/>
    <Parameter xsi:type="StringParameter" name="SourceContent" value="#vAgentConfiguration.agentTempDir#\output.txt"/>
    <Parameter xsi:type="StringParameter" name="VariableName" value="data"/>
    </Statement>
    "); vertical-align: bottom; height: 10px;"><Statement name="SendEmail" continueOnFail="false">
    <Parameter xsi:type="StringParameter" name="To" value="#adminDefaults.adminEmail#"/>
    <Parameter xsi:type="StringParameter" name="Subject" value="Monitor Info - #vAgentConfiguration.lastLoginName#"/>
    <Parameter xsi:type="MultiLineStringParameter" name="Body" value="#vAgentConfiguration.lastLoginName# #vAgentConfiguration.Machine_GroupID# ---------------------- #data#"/>
    </Statement>
    </Then>
    "); vertical-align: bottom; height: 10px;"><Else>
    "); vertical-align: bottom; height: 10px;"><Statement name="ExecuteScript" continueOnFail="false">
    <Parameter xsi:type="StringParameter" name="ScriptID" value="1189346724"/>
    <Parameter xsi:type="StringParameter" name="ScriptName" value="Audit Monitor Information and Specs"/>
    <Parameter xsi:type="StringParameter" name="TimeDelay" value="30"/>
    <Parameter xsi:type="EnumParameter" name="TimeUnit" value="Minutes"/>
    </Statement>
    </Else>
    </If>
    </Body>
    </Procedure>
    </ScriptExport>

    stefanie.visser

    weem18ws04-pjb.werkstations.wac

    ----------------------

    ==================================================

    Monitor Name      :
    HP E232

    Active            :
    Yes

    Serial Number     :
    3CQ546075L

    Manufacture Week  :
    46 / 2015

    ManufacturerID    :
    61474 (0xF022)

    ProductID         :
    12921 (0x3279)

    Maximum Resolution: 1920 X 1080

    Image Size        :

    Maximum Image Size: 51 X 29 cm (23.1 Inch) Horizontal
    Frequency: 30 - 80 KHz Vertical Frequency: 50 - 60 Hz

    Digital           :
    Yes

    Standby Mode      :
    No

    Suspend Mode      :
    No

    Low-Power Mode    :
    Yes

    Default GTF       :
    No

    Display Gamma     :
    2.20

    Serial Number (Numeric): 0 (0x00000000)

    EDID Version      :
    1.4

    Registry Key      :
    HWP3279\4&9db0a8a&0&UID200195

    Computer Name     :

    Last Update Time  :
    13-8-2020 7:59:01

    ==================================================

     

    ==================================================

    Monitor Name      :
    HP E232

    Active            :
    Yes

    Serial Number     :
    3CQ54810WT

    Manufacture Week  :
    48 / 2015

    ManufacturerID    :
    61474 (0xF022)

    ProductID         :
    12923 (0x327B)

    Maximum Resolution: 1920 X 1080

    Image Size        :

    Maximum Image Size: 51 X 29 cm (23.1 Inch) Horizontal
    Frequency: 30 - 80 KHz Vertical Frequency: 50 - 60 Hz

    Digital           :
    Yes

    Standby Mode      :
    No

    Suspend Mode      :
    No

    Low-Power Mode    :
    Yes

    Default GTF       :
    No

    Display Gamma     :
    2.20

    Serial Number (Numeric): 16843009 (0x01010101)

    EDID Version      :
    1.4

    Registry Key      :
    HWP327B\4&9db0a8a&0&UID224795

    Computer Name     :

    Last Update Time  :
    13-8-2020 7:59:01

    ==================================================

     

     



  • Pieter Jorritsma
    Pieter Jorritsma Member DECAF
    edited October 2020

    Will write script for you :) give me a day or 2 :) 

    See you Dutch :), if you like join Kaseya Discord Server https://discord.gg/z77fXw <  we can talk  :)

  • Martijn Westers
    Martijn Westers Member CHOCOLATE MILK
    edited October 2020

    @Pieter is that the Kaseya channel? On discord? Your'e link was invalid it stated? And I am allready in Discord...


  • Pieter Jorritsma
    Pieter Jorritsma Member DECAF
    edited October 2020

    @Martijn,

    New link: https://discord.gg/9tUM9N or just add me will invite you then PJotter#1876

  • Martijn Westers
    Martijn Westers Member CHOCOLATE MILK
    edited October 2020

    Hi Pieter , found you in the Kaseya channels !  My name in Discord is GarfieldRulez ;-)

  • Pieter Jorritsma
    Pieter Jorritsma Member DECAF
    edited October 2020

    Script is submitted for approval :) "Thank you for submitting Audit Monitor Name (Manufacturer and Model) to the Automation Exchange"

This discussion has been closed.

Weekly Leaderboard