Skip to content
Menu
The Lonely Administrator
  • PowerShell Tips & Tricks
  • Books & Training
  • Essential PowerShell Learning Resources
  • Privacy Policy
  • About Me
The Lonely Administrator

Techmentor: WMIC Examples

Posted on March 21, 2006July 2, 2013

I didn't get a chance to run through the WMIC examples. The Advanced VBScript book covers this topic in a little more detail. I also have a short PDF intro on WMIC you can download at http://www.jdhitsolutions.com/tutorials.htm

Manage and Report Active Directory, Exchange and Microsoft 365 with
ManageEngine ADManager Plus - Download Free Trial

Exclusive offer on ADManager Plus for US and UK regions. Claim now!

Before you run any examples, you need to "install" WMIC. This basically means at a command prompt type WMIC. If you've never run it before you'll get a message saying it is getting installed and then you'll get a WMIC prompt. Type EXIT to return to a command prompt. Then you can run these examples:

wmic os get caption,csdversion

servers.txt contains a list of computer names
wmic /node:@servers.txt os get caption,csdversion

wmic process get name,workingsetsize

return information about the spooler process
wmic process where (name="spoolsv.exe") list brief

wmic process where "workingsetsize>10000000" list brief

wmic cpu list brief

wmic cpu list brief /format:textvaluelist

wmic /output:osinfo.html os list full /format:hform

Then open osinfo.html in your web browser

WMIC /? will give you help information.

Technorati Tags:
WMI
WMIC
Scripting


Behind the PowerShell Pipeline

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to print (Opens in new window) Print
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...

Related

reports

Powered by Buttondown.

Join me on Mastodon

The PowerShell Practice Primer
Learn PowerShell in a Month of Lunches Fourth edition


Get More PowerShell Books

Other Online Content

github



PluralSightAuthor

Active Directory ADSI Automation Backup Books CIM CLI conferences console Friday Fun FridayFun Function functions Get-WMIObject GitHub hashtable HTML Hyper-V Iron Scripter ISE Measure-Object module modules MrRoboto new-object objects Out-Gridview Pipeline PowerShell PowerShell ISE Profile prompt Registry Regular Expressions remoting SAPIEN ScriptBlock Scripting Techmentor Training VBScript WMI WPF Write-Host xml

©2025 The Lonely Administrator | Powered by SuperbThemes!
%d