Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

WMI

Direct answer

WMI is the older Windows management interface queried with Get-WmiObject in Windows PowerShell. PowerShell 7 uses the CIM cmdlets instead, which use the same classes over WS-Man.

When to use this

Use this when older scripts use WMI cmdlets.

First 30 seconds

1. WMI is Windows' management instrumentation.

2. Access via CIM cmdlets.

3. Repository corruption: verify/salvage.

4. WMI event subscriptions are a persistence technique — monitor.

5. DCOM firewall needs.

Operational verification

WMI provider → CIM/WMI query → data

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Windows PowerShell 5.1 / Windows WMI
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformWindows PowerShell 5.1 / Windows WMI · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when older scripts use WMI cmdlets.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

On legacy Windows PowerShell, show namespace/class availability and retrieve a read-only instance before attempting methods. Compare a CIM query for the same management object where migrating. Capture provider/namespace, target computer and authentication context because a DCOM transport failure is different from a WMI provider/class failure.

Step 2 Common mistakes Narrow the fault
  • Get-WmiObject in PowerShell 7 (removed).
Step 3 Where it fails Narrow the fault

Treat WMI as a legacy Windows-specific compatibility boundary. A script working under Windows PowerShell 5.1 can fail under modern pwsh because command availability changed, even though the target WMI provider still exists. Separate client cmdlet availability, DCOM transport, WMI provider semantics and managed-resource state.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Get-WmiObject exists only in Windows PowerShell.
  • Use Get-CimInstance in PowerShell 7.
  • The classes are the same.
Key checks
  • Get-CimClass -Namespace root/cimv2 | measure — available classes
  • winmgmt /verifyrepository — repository check
  • Legacy Get-WmiObject usage — migrate to CIM
ReferenceWhy it matters1 section · depth on demand

In depth

WMI (Windows Management Instrumentation) is the underlying management data model in Windows: classes such as Win32_Service, Win32_Process and MSFT_NetAdapter describe the system. The legacy Get-WmiObject cmdlets use DCOM and are not available in PowerShell 7; the CIM cmdlets access the same classes over WinRM.

Get-CimClass -Namespace root/cimv2 -ClassName Win32_*Network* | Select-Object CimClassName
Get-CimInstance -Namespace root/StandardCimv2 -ClassName MSFT_NetAdapter |
  Select-Object Name, InterfaceDescription, LinkSpeed

WMI is also used for event subscriptions and by attackers for persistence and lateral movement, so monitor WMI activity (event log Microsoft-Windows-WMI-Activity/Operational) and restrict remote WMI access to administration hosts.

ReferenceImportant terms & boundaries1 section · depth on demand

PowerShell mechanics

WMI is the legacy Windows management infrastructure exposed historically in Windows PowerShell through commands such as Get-WmiObject and through COM/.NET APIs. WMI providers expose namespaces, classes, instances and methods, frequently over DCOM for remote access. Modern cross-version PowerShell automation should generally prefer CIM cmdlets where equivalent functionality exists, while recognizing that legacy scripts may still depend on WMI-specific behavior.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Authoring and lifecycle

When maintaining WMI automation, make Windows PowerShell 5.1 versus PowerShell 7 compatibility explicit because legacy WMI cmdlets are not a portable modern contract. Scope remote DCOM/firewall permissions narrowly, identify the exact namespace/class, and plan migrations to CIM where provider semantics match. Do not mechanically replace APIs without checking method/property differences.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Configuration example

Windows PowerShell 5.1 / Windows WMI Windows PowerShell 5.1 legacyMinimal authored PowerShell pattern for WMI

Assumptions: Review target identity, permissions and environment before mutation.

Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object CSName,Caption,Version
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docWindows PowerShell 5.1 / Windows WMI Windows PowerShell 5.1 legacy

Microsoft Learn documentation reviewed for bounded PowerShell reference claims. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/07-working-with-wmi?view=powershell-7.5 · confidence 94%
Embedded reference data

Quick lookup tables

WMI · PowerShell operational reference

Topic-specific PowerShell runtime identity, persistence, verification, output and failure-boundary lookup.

BoundaryWMI reference
Runtime identityPowerShell edition/version + command/module source
Persistent intentScript/module/config prerequisites under source control
VerificationRead-only discovery → execution evidence → independent target read-back
Output contractStructured objects/streams before formatting
Failure boundarySeparate engine/binding from transport/API/native and target-state failures
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

WMI formatted output can hide namespace/class identifiers and provider-specific return codes. An RPC/DCOM connection success does not mean the WMI namespace authorizes the requested operation. When comparing WMI and CIM results, align properties and identity keys rather than comparing display tables.

Confirmation

Confirm action

Continue?