Kaseya Community

Audit - Hardware - Get Graphics Card And Driver

  • Description: This procedure will get the graphics card driver and version and make it visible under the "Audit, Custom Fields" tab.

    Kaseya customer value: Evaluate and verify the system performance for the customer user experience.

    End user value: Ensures that the machine is working in optimal performance conditions.

    Dependencies: Windos 2008 Server, Windows 7 or Windows Vista. Make sure you have created Graphics Card and Graphics Driver (all string) under "Audit, Custom Fields".

    Usage: Run at any given time or scheduled frequently to keep Audit up to date.

    Report options: Audit, Aggregate Table, Graphics Card or Graphics Driver.

    Script maintainer: ronny [at] upstream.se

    Support: This script is delivered "as is". No support included.

    NOTE: I have made separate procedures for Windows 7, Windows 2008 Server and Windows Vista just to make it human readable :) When exporting the link in "Call procedure" will get dropped. Make sure to reattach the procedures in "Audit - Hardware - Get Graphics Card And Driver" to call for all the different underlying operating systems procedures.

    <?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">
      <Folder name="Audit - Hardware - Get Graphics Card And Driver" treePres="3">
        <Procedure name="Audit - Hardware - Get Graphics Card And Driver" treePres="3" id="132702191">
          <Body description="Description: This procedure will get the graphics card driver and version and make it visible under the &quot;Audit, Custom Fields&quot; tab.&#xA;&#xA;Kaseya customer value: Evaluate and verify the system performance for the customer user experience.&#xA;&#xA;End user value: Ensures that the machine is working in optimal performance conditions.&#xA;&#xA;Dependencies: Windos 2008 Server, Windows 7 or Windows Vista. Make sure you have created Graphics Card and Graphics Driver (all string) under &quot;Audit, Custom Fields&quot;. &#xA;&#xA;Usage: Run at any given time or scheduled frequently to keep Audit up to date.&#xA;&#xA;Report options: Audit, Aggregate Table, Graphics Card or Graphics Driver.&#xA;&#xA;Script maintainer: ronny [at] upstream.se&#xA;&#xA;Support: This script is delivered &quot;as is&quot;. No support included.">
            <Statement description="Execute the specified procedure. - NOTE: this procedure does not complete until the called procedure completes." name="ExecuteScript" continueOnFail="false" osType="NT4|2000|XP|2003|Vista|2008">
              <Parameter xsi:type="StringParameter" name="ScriptID" value="369282839" />
              <Parameter xsi:type="StringParameter" name="ScriptName" value="Audit - Hardware - Get Graphics Card And Driver - Server 2008" />
              <Parameter xsi:type="StringParameter" name="TimeDelay" value="" />
              <Parameter xsi:type="EnumParameter" name="TimeUnit" value="Immediate" />
            </Statement>
            <Statement description="Execute the specified procedure. - NOTE: this procedure does not complete until the called procedure completes." name="ExecuteScript" continueOnFail="false" osType="NT4|2000|XP|2003|Vista|2008">
              <Parameter xsi:type="StringParameter" name="ScriptID" value="723761033" />
              <Parameter xsi:type="StringParameter" name="ScriptName" value="Audit - Hardware - Get Graphics Card And Driver - Windows 7" />
              <Parameter xsi:type="StringParameter" name="TimeDelay" value="" />
              <Parameter xsi:type="EnumParameter" name="TimeUnit" value="Immediate" />
            </Statement>
            <Statement description="Execute the specified procedure. - NOTE: this procedure does not complete until the called procedure completes." name="ExecuteScript" continueOnFail="false" osType="NT4|2000|XP|2003|Vista|2008">
              <Parameter xsi:type="StringParameter" name="ScriptID" value="1103828206" />
              <Parameter xsi:type="StringParameter" name="ScriptName" value="Audit - Hardware - Get Graphics Card And Driver - Windows Vista" />
              <Parameter xsi:type="StringParameter" name="TimeDelay" value="" />
              <Parameter xsi:type="EnumParameter" name="TimeUnit" value="Immediate" />
            </Statement>
          </Body>
        </Procedure>
        <Procedure name="Audit - Hardware - Get Graphics Card And Driver - Server 2008" treePres="3" id="369282839">
          <Body description="Description: This procedure will get the graphics card driver and version and make it visible under the &quot;Audit, Custom Fields&quot; tab.&#xA;&#xA;Kaseya customer value: Evaluate and verify the system performance for the customer user experience.&#xA;&#xA;End user value: Ensures that the machine is working in optimal performance conditions.&#xA;&#xA;Dependencies: Windos 2008 Server. Make sure you have created Graphics Card and Graphics Driver (all string) under &quot;Audit, Custom Fields&quot;. &#xA;&#xA;Usage: Run at any given time or scheduled frequently to keep Audit up to date.&#xA;&#xA;Report options: Audit, Aggregate Table, Graphics Card or Graphics Driver.&#xA;&#xA;Script maintainer: ronny [at] upstream.se&#xA;&#xA;Support: This script is delivered &quot;as is&quot;. No support included.">
            <If description="">
              <Condition name="CheckVariable">
                <Parameter xsi:type="StringParameter" name="VariableName" value="#vMachine.OsInfo#" />
                <Parameter xsi:type="EnumParameter" name="Condition" value="Contains" />
                <Parameter xsi:type="StringParameter" name="Value" value="x64" />
              </Condition>
              <Then>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="2008">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT NAME | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="True" />
                </Statement>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="2008">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT DRIVERVERSION | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="True" />
                </Statement>
              </Then>
            </If>
            <If description="">
              <Condition name="CheckVariable">
                <Parameter xsi:type="StringParameter" name="VariableName" value="#vMachine.OsInfo#" />
                <Parameter xsi:type="EnumParameter" name="Condition" value="DoesNotContain" />
                <Parameter xsi:type="StringParameter" name="Value" value="x64" />
              </Condition>
              <Then>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="2008">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT NAME | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
                </Statement>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="2008">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT DRIVERVERSION | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
                </Statement>
              </Then>
            </If>
            <Statement description="" name="GetVariable" continueOnFail="false" osType="2008">
              <Parameter xsi:type="EnumParameter" name="VariableType" value="FileContent" />
              <Parameter xsi:type="StringParameter" name="SourceContent" value="#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
              <Parameter xsi:type="StringParameter" name="VariableName" value="videocontroller" />
            </Statement>
            <Statement description="" name="GetVariable" continueOnFail="false" osType="2008">
              <Parameter xsi:type="EnumParameter" name="VariableType" value="FileContent" />
              <Parameter xsi:type="StringParameter" name="SourceContent" value="#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
              <Parameter xsi:type="StringParameter" name="VariableName" value="vgadriverversion" />
            </Statement>
            <Statement description="Delete the specified file - full path to the filename required." name="DeleteFile" continueOnFail="false" osType="2008">
              <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
            </Statement>
            <Statement description="Delete the specified file - full path to the filename required." name="DeleteFile" continueOnFail="false" osType="2008">
              <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
            </Statement>
            <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false" osType="2008">
              <Parameter xsi:type="StringParameter" name="ColumnName" value="Graphics Card" />
              <Parameter xsi:type="StringParameter" name="Value" value="#videocontroller#" />
            </Statement>
            <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false" osType="2008">
              <Parameter xsi:type="StringParameter" name="ColumnName" value="Graphics Driver" />
              <Parameter xsi:type="StringParameter" name="Value" value="#vgadriverversion#" />
            </Statement>
          </Body>
        </Procedure>
        <Procedure name="Audit - Hardware - Get Graphics Card And Driver - Windows 7" treePres="3" id="723761033">
          <Body description="Description: This procedure will get the graphics card driver and version and make it visible under the &quot;Audit, Custom Fields&quot; tab.&#xA;&#xA;Kaseya customer value: Evaluate and verify the system performance for the customer user experience.&#xA;&#xA;End user value: Ensures that the machine is working in optimal performance conditions.&#xA;&#xA;Dependencies: Windows 7. Make sure you have created Graphics Card and Graphics Driver (all string) under &quot;Audit, Custom Fields&quot;. &#xA;&#xA;Usage: Run at any given time or scheduled frequently to keep Audit up to date.&#xA;&#xA;Report options: Audit, Aggregate Table, Graphics Card or Graphics Driver.&#xA;&#xA;Script maintainer: ronny [at] upstream.se&#xA;&#xA;Support: This script is delivered &quot;as is&quot;. No support included.">
            <If description="">
              <Condition name="CheckVariable">
                <Parameter xsi:type="StringParameter" name="VariableName" value="#vMachine.OsInfo#" />
                <Parameter xsi:type="EnumParameter" name="Condition" value="Contains" />
                <Parameter xsi:type="StringParameter" name="Value" value="x64" />
              </Condition>
              <Then>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="7">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT NAME | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="True" />
                </Statement>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="7">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT DRIVERVERSION | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="True" />
                </Statement>
              </Then>
            </If>
            <If description="">
              <Condition name="CheckVariable">
                <Parameter xsi:type="StringParameter" name="VariableName" value="#vMachine.OsInfo#" />
                <Parameter xsi:type="EnumParameter" name="Condition" value="DoesNotContain" />
                <Parameter xsi:type="StringParameter" name="Value" value="x64" />
              </Condition>
              <Then>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="7">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT NAME | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
                </Statement>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="7">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT DRIVERVERSION | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
                </Statement>
              </Then>
            </If>
            <Statement description="" name="GetVariable" continueOnFail="false" osType="7">
              <Parameter xsi:type="EnumParameter" name="VariableType" value="FileContent" />
              <Parameter xsi:type="StringParameter" name="SourceContent" value="#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
              <Parameter xsi:type="StringParameter" name="VariableName" value="videocontroller" />
            </Statement>
            <Statement description="" name="GetVariable" continueOnFail="false" osType="7">
              <Parameter xsi:type="EnumParameter" name="VariableType" value="FileContent" />
              <Parameter xsi:type="StringParameter" name="SourceContent" value="#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
              <Parameter xsi:type="StringParameter" name="VariableName" value="vgadriverversion" />
            </Statement>
            <Statement description="Delete the specified file - full path to the filename required." name="DeleteFile" continueOnFail="false" osType="7">
              <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
            </Statement>
            <Statement description="Delete the specified file - full path to the filename required." name="DeleteFile" continueOnFail="false" osType="7">
              <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
            </Statement>
            <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false" osType="7">
              <Parameter xsi:type="StringParameter" name="ColumnName" value="Graphics Card" />
              <Parameter xsi:type="StringParameter" name="Value" value="#videocontroller#" />
            </Statement>
            <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false" osType="7">
              <Parameter xsi:type="StringParameter" name="ColumnName" value="Graphics Driver" />
              <Parameter xsi:type="StringParameter" name="Value" value="#vgadriverversion#" />
            </Statement>
          </Body>
        </Procedure>
        <Procedure name="Audit - Hardware - Get Graphics Card And Driver - Windows Vista" treePres="3" id="1103828206">
          <Body description="Description: This procedure will get the graphics card driver and version and make it visible under the &quot;Audit, Custom Fields&quot; tab.&#xA;&#xA;Kaseya customer value: Evaluate and verify the system performance for the customer user experience.&#xA;&#xA;End user value: Ensures that the machine is working in optimal performance conditions.&#xA;&#xA;Dependencies: Windows Vista. Make sure you have created Graphics Card and Graphics Driver (all string) under &quot;Audit, Custom Fields&quot;. &#xA;&#xA;Usage: Run at any given time or scheduled frequently to keep Audit up to date.&#xA;&#xA;Report options: Audit, Aggregate Table, Graphics Card or Graphics Driver.&#xA;&#xA;Script maintainer: ronny [at] upstream.se&#xA;&#xA;Support: This script is delivered &quot;as is&quot;. No support included.">
            <If description="">
              <Condition name="CheckVariable">
                <Parameter xsi:type="StringParameter" name="VariableName" value="#vMachine.OsInfo#" />
                <Parameter xsi:type="EnumParameter" name="Condition" value="Contains" />
                <Parameter xsi:type="StringParameter" name="Value" value="x64" />
              </Condition>
              <Then>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="Vista">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT NAME | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="True" />
                </Statement>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="Vista">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT DRIVERVERSION | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="True" />
                </Statement>
              </Then>
            </If>
            <If description="">
              <Condition name="CheckVariable">
                <Parameter xsi:type="StringParameter" name="VariableName" value="#vMachine.OsInfo#" />
                <Parameter xsi:type="EnumParameter" name="Condition" value="DoesNotContain" />
                <Parameter xsi:type="StringParameter" name="Value" value="x64" />
              </Condition>
              <Then>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="Vista">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT NAME | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
                </Statement>
                <Statement description="" name="ExecuteShellCommand" continueOnFail="false" osType="Vista">
                  <Parameter xsi:type="StringParameter" name="Command" value="powershell &quot;GET-WMIOBJECT WIN32_VIDEOCONTROLLER | SELECT-OBJECT DRIVERVERSION | FORMAT-WIDE -autosize&quot; &gt;&gt;#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
                  <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
                  <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
                </Statement>
              </Then>
            </If>
            <Statement description="" name="GetVariable" continueOnFail="false" osType="Vista">
              <Parameter xsi:type="EnumParameter" name="VariableType" value="FileContent" />
              <Parameter xsi:type="StringParameter" name="SourceContent" value="#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
              <Parameter xsi:type="StringParameter" name="VariableName" value="videocontroller" />
            </Statement>
            <Statement description="" name="GetVariable" continueOnFail="false" osType="Vista">
              <Parameter xsi:type="EnumParameter" name="VariableType" value="FileContent" />
              <Parameter xsi:type="StringParameter" name="SourceContent" value="#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
              <Parameter xsi:type="StringParameter" name="VariableName" value="vgadriverversion" />
            </Statement>
            <Statement description="Delete the specified file - full path to the filename required." name="DeleteFile" continueOnFail="false" osType="Vista">
              <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\videocontroller.txt" />
            </Statement>
            <Statement description="Delete the specified file - full path to the filename required." name="DeleteFile" continueOnFail="false" osType="Vista">
              <Parameter xsi:type="StringParameter" name="Path" value="#vAgentConfiguration.agentTempDir#\vgadriverversion.txt" />
            </Statement>
            <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false" osType="Vista">
              <Parameter xsi:type="StringParameter" name="ColumnName" value="Graphics Card" />
              <Parameter xsi:type="StringParameter" name="Value" value="#videocontroller#" />
            </Statement>
            <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false" osType="Vista">
              <Parameter xsi:type="StringParameter" name="ColumnName" value="Graphics Driver" />
              <Parameter xsi:type="StringParameter" name="Value" value="#vgadriverversion#" />
            </Statement>
          </Body>
        </Procedure>
      </Folder>
    </ScriptExport>



    [edited by: Ronny Tunfjord at 6:40 AM (GMT -7) on 4-6-2011] Code change
  • Nice Thanks for the post Ronny!

  • This post is pretty old; is it safe to presume that this is still going to work today?  I'm having a horrible time identifying video adapters and this looks exactly what I need.

  • Hi James. Old it is. Working still it does : ) Please give feedback on your progress. Don't forget to create the custom fields in the Audit before executing.