Requests for Automation

Custom field with Monitor Audit info

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.

Discussion
Gravatar for Pieter Jorritsma
Pieter Jorritsma 6 months ago

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

Gravatar for Martijn Westers
Martijn Westers 6 months ago

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.

<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="Audit Monitor Information and Specs" treePres="3" id="1189346724" folderId="469415145492848" treeFullPath="WAC PRODUKTIE.Info">
<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. ">
<If description="">
<Condition name="UserIsLoggedIn">
<Parameter xsi:type="StringParameter" name="UserName" value=""/>
</Condition>
<Then>
<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>
<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>
<Statement name="PauseScript" continueOnFail="false">
<Parameter xsi:type="IntegerParameter" name="Seconds" value="2"/>
</Statement>
<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>
<Statement name="PauseScript" continueOnFail="false">
<Parameter xsi:type="IntegerParameter" name="Seconds" value="5"/>
</Statement>
<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>
<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>
<Else>
<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

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

 

 



Gravatar for Pieter Jorritsma
Pieter Jorritsma 6 months ago

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  :)

Gravatar for Martijn Westers
Martijn Westers 6 months ago

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


Gravatar for Pieter Jorritsma
Pieter Jorritsma 6 months ago

@Martijn,

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

Gravatar for Martijn Westers
Martijn Westers 6 months ago

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

Gravatar for Pieter Jorritsma
Pieter Jorritsma 6 months ago

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

Details

  • 0 Votes
  • 7 Comments
  • Open for 6 months
  • Created by Martijn Westers