Script to Check Devices Without Drivers

Posted on Updated on

This is a quick script that I wrote to identify if a remote computer has a device without a driver installed.

'==========================================================================
' NAME: DevicesWithoutDrivers
' AUTHOR: Nick Moseley, https://t3chn1ck.wordpress.com
' DATE  : 3/30/2011
' COMMENT: Connects to WMI on a remote computer to check for devices without
' a driver installed.
'==========================================================================
Option Explicit
Dim oWMI, sComputerName, colItems, oItem
sComputerName = ucase(InputBox ("Enter Computer Name", "Name", "."))
Set oWMI = GetObject ("winmgmts:\\" & sComputerName & "\root\cimv2")
Set colItems = oWMI.ExecQuery ("Select * from Win32_PnPEntity where status = 'error'")

For Each oItem In colItems
 WScript.Echo "Name: " & oItem.Name & "; status = " & oItem.status
Next

Advertisements

One thought on “Script to Check Devices Without Drivers

    Missing Drivers | Scriptimus Ex Machina said:
    May 5, 2011 at 1:23 am

    […] Nick Moseley has inspired me to write today’s blog with my own efforts. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s