Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » Scripts » Windows Management Instrumentation Commands
  • db nginxseriesanisibleplaybook 1540x748 1
    How to install and configure Ansible on Ubuntu Configuration Management Tool
  • Move Resources On Azure
    Move Azure Resources between Subscriptions AWS/Azure/OpenShift
  • How to Force Stop a Grayed Out Windows Service
    How To Force Stop A Windows Service When Stop Option Is Grayed Out Windows
  • How to Disable the Command Prompt on Windows 11
    How to Disable the Command Prompt on Windows 11 Windows
  • screenshot 2020 04 07 at 21.02.45
    Trend Micro WorryFree Business Security Server Setup Anti-Virus Solution
  • Enable or Disable Siri
    How to enable Siri on Mac devices Mac
  • the remote procedure call failed
    Error 0xc1420117: The directory could not be completely unmounted Windows Server
  • redisf
    How to install Redis on Linux System Linux

Windows Management Instrumentation Commands

Posted on 15/03/202010/10/2024 Christian By Christian No Comments on Windows Management Instrumentation Commands
Windows Management Instrumentation

In this article, we shall discuss Windows Management Instrumentation Commands. Windows Management Instrumentation (WMI) is the Microsoft implementation of Web-Based Enterprise Management (WBEM), which is an industry initiative to develop a standard technology for accessing management information in an enterprise environment. Please see how to Get a list of installed programs locally or remotely in Windows, how to query a list of installed programs in Windows, and how to Remote WMI Connection: How to enable or disable WMI Traffic Using Firewall UI.

WMI is part of Windows since Windows 2000. It is a service that can query almost every detail about a computer system. PowerShell ships with full WMI support. Here is an article displaying the steps to determine why an MBAM-protected device is non-compliant.

Common Information Model) cmdlets

These are the most important CIM (Common Information Model) cmdlets and are fully supported by PowerShell.

Cmdlets used in PowerShellDescription
Get-CimInstance
Gets instances of WMI classes. This is the most important cmdlet  
Get-CimClassGets a WMI class. Use it to access static WMI methods.
Invoke-CimMethodRuns a WMI method, and returns results.
Set-CimInstanceWrites back changed properties.
New-CimSessionCreates a new remoting session to one or more remote systems
New-CimSessionOptionDefines special options for remoting connections.
Remove-CimSessionCloses and removes a remoting session that is no longer used.
New-CimInstanceCreates a new instances of a WMI class, i.e. for temporary use.

Also, see how to Remote WMI Connection: Manage Traffic via Command Prompt, How to fix Get-CimInstance Access PermissionDenied, and how to use PowerShell to View and Change BIOS Settings.

WMI Commands – How to query information using WMI (Get-CimInstance)

To get information from WMI, you ask for instances of a given class. The PowerShell code for this is always the same, so the hardest part in WMI is to figure out the name of the class that describes what you are after.

1: BIOS

Get-CimInstance -ClassName Win32_BIOS

Or run

Get-CimInstance

<And enter the class name at the prompt>

Win32_BIOS

2. DISK – list logical disk information

Get-CimInstance -ClassName Win32_LogicalDisk

or run

Get-CimInstance

<And enter the class name at the prompt>

Win32_LWin32_LogicalDisk

The WMI namespace root/cimv2 is the default namespace and contains classes for computer hardware and configuration.

root/cimv2 contains the following 276 classes:

The namespace root/cimv2 contains many more classes that may serve internal purposes (link classes to define relationships, abstract classes that serve as a template for inherited classes, etc. Take a look at the other class types.

I hope you found this blog post helpful on Windows Management Instrumentation Commands. If you have any questions, please let me know in the comment session.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Scripts Tags:Windows Server 2016

Post navigation

Previous Post: How to create an Environment variables in Windows
Next Post: What is GPO and how can it be launched in Windows

Related Posts

  • powershell01
    How to add servers to the Trusted Hosts list Scripts
  • CI With GitLab 1
    Build Docker Images with GitLab CI Automation
  • powershell commands lede 1024x276 1
    Enable WinRM on Windows Servers and Windows PCs Scripts
  • Featured image 9
    Create and Delete Registry Keys via PowerShell in Windows Scripts
  • powershell commands lede 1024x276 1
    PowerShell Remoting: Guide to Windows Management Instrumentation Scripts
  • powershell
    How to perform PowerShell syntax check using PSScriptAnalyzer Scripts

More Related Articles

powershell01 How to add servers to the Trusted Hosts list Scripts
CI With GitLab 1 Build Docker Images with GitLab CI Automation
powershell commands lede 1024x276 1 Enable WinRM on Windows Servers and Windows PCs Scripts
Featured image 9 Create and Delete Registry Keys via PowerShell in Windows Scripts
powershell commands lede 1024x276 1 PowerShell Remoting: Guide to Windows Management Instrumentation Scripts
powershell How to perform PowerShell syntax check using PSScriptAnalyzer Scripts

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • db nginxseriesanisibleplaybook 1540x748 1
    How to install and configure Ansible on Ubuntu Configuration Management Tool
  • Move Resources On Azure
    Move Azure Resources between Subscriptions AWS/Azure/OpenShift
  • How to Force Stop a Grayed Out Windows Service
    How To Force Stop A Windows Service When Stop Option Is Grayed Out Windows
  • How to Disable the Command Prompt on Windows 11
    How to Disable the Command Prompt on Windows 11 Windows
  • screenshot 2020 04 07 at 21.02.45
    Trend Micro WorryFree Business Security Server Setup Anti-Virus Solution
  • Enable or Disable Siri
    How to enable Siri on Mac devices Mac
  • the remote procedure call failed
    Error 0xc1420117: The directory could not be completely unmounted Windows Server
  • redisf
    How to install Redis on Linux System Linux

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,836 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.