Canonical: https://screensie.com/knowledge-base/command-line/command-prompt/legacy-advanced-wmic/

Translate WMIC WHERE and GET expressions into supported PowerShell CIM filters. Move WMIC WHERE clauses into Get-CimInstance -Filter and consume.

[← All guides](https://screensie.com/knowledge-base/)



Command Line


# Advanced Legacy WMIC Queries and CIM Migration




## How do I migrate WMIC filters to PowerShell CIM?




Move WMIC WHERE clauses into Get-CimInstance -Filter and consume structured properties.




Translate WMIC WHERE and GET expressions into supported PowerShell CIM filters.




Updated 
September 2, 2026
Difficulty: Advanced
Time: 7 min
Applies to: Windows, Windows 10, Windows 11


 


Follow the steps in order and stop if the screen or target does not match what is described. Use administrator access only when the task requires it.




**Before you begin**


Save open work. Confirm that you are working on the intended computer and that you are authorized to make the change.




## Identify the old query




Example legacy intent: list automatically starting services that are not running.




## Translate the filter




Use a provider-side CIM filter.




Command

```
Get-CimInstance Win32_Service -Filter "StartMode='Auto' AND State<>'Running'" | Select-Object Name, DisplayName, State, StartMode
```




## Translate process queries




Request only the fields required by the task.




Command

```
Get-CimInstance Win32_Process -Filter "Name='notepad.exe'" -Property Name, ProcessId, ExecutablePath
```




## Avoid string parsing




Use Where-Object, Select-Object, Export-Csv, or ConvertTo-Json with the returned objects.




## Test behavior




Provider classes and permissions can vary. Test read-only queries on each target OS before automating changes.




## Retire modifying WMIC calls




Do not mechanically translate delete, call, or set operations. Re-evaluate authorization, confirmation, rollback, and supported cmdlets first.




**Verify the result**


Repeat the relevant check and confirm the intended result before considering the task complete.


 


## Related guides




[Command Line

### Legacy Networked WMIC Operations and Safer CIM Alternatives

Translate older WMIC /node workflows to authenticated PowerShell CIM sessions. 7 min · Advanced](https://screensie.com/knowledge-base/command-line/command-prompt/legacy-networked-wmic/)




[Command Line

### Legacy WMIC Basics and Modern Replacements

Understand common WMIC inventory commands and their supported PowerShell CIM replacements. 7 min · Easy](https://screensie.com/knowledge-base/command-line/command-prompt/legacy-wmic-basics/)




[Command Line

### Advanced PowerShell: Objects, Pipelines, and Safe Automation

Build predictable PowerShell pipelines and test changes before applying them. 7 min · Advanced](https://screensie.com/knowledge-base/command-line/powershell/advanced-powershell/)




[Command Line

### Command Prompt Basics

Learn how to open Command Prompt, navigate folders, and get command help. 7 min · Easy](https://screensie.com/knowledge-base/command-line/command-prompt/command-prompt-basics/)
