Fun with WMIC

(When preparing to write this brief post, I see that my MVP colleague Sherry Kissinger also has a post on WMIC and Windows Installer. Check it out – it’s a good read too.) 

Here are a couple more examples to add to your tool belt, especially when working with teammates in remote offices, and you need information from WinPE. My perfect example is that a tech reports in that OSD isn’t working, the symptom is that no fixed disks appear to be present on the system. This error usually means that you don’t have a mass storage driver in WinPE for the hardware. Of course, this error can also mean that you have a hard disk error, or that it’s not connected to your system.

Back to task, here are two example command lines for querying win32_pnpentity to display all Plug-and-Play information for a system.

Wmic /namespace:\\ROOT\cimv2 path win32_pnpentity get /format:hform >”c:\temp\data.htm”

Wmic /namespace:\\ROOT\cimv2 path win32_pnpentity get /format:csv >”c:\temp\test.csv”

The first example writes the information to a .htm file, and the second writes the information to a .csv file.

Once you have the PNP IDs, you can begin your journey to find the appropriate mass storage drivers.

More info: Creating and editing formats in WMIC.

Greg

About Greg Ramsey
Greg Ramsey is a systems engineer specializing in global systems management for Dell IT. He has a B.S. in Computer Sciences and Engineering from the Ohio State University and is a Microsoft Most Valuable Professional (MVP) for Microsoft System Center Configuration Manager. Greg coauthored SMS 2003 Recipes: A Problem-Solution Approach (Apress, 2006), Microsoft System Center Configuration Manager Unleashed (Sams, 2009), Microsoft System Center 2012 Configuration Manager Unleashed (Sams, 2012), and Microsoft System Center 2012 Configuration Manager: Administration Cookbook (Packt Publishing, 2012), and Microsoft System Center 2012 Configuration Manager R2 Unleashed (Sams, 2012). Greg is cofounder of the Ohio SMS Users Group, and the Central Texas Systems Management User Group.

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

%d bloggers like this: