Canonical: https://screensie.com/knowledge-base/command-line/powershell/networked-wmi-cim/

Query an authorized remote Windows computer through a CIM session. Create a CimSession to an explicitly authorized computer, run read-only queries, and.

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



Command Line


# Networked WMI Operations with PowerShell CIM




## How do I query WMI on an authorized remote PC?




Create a CimSession to an explicitly authorized computer, run read-only queries, and remove the session when finished.




Query an authorized remote Windows computer through a CIM session.




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.




## Prepare managed remoting




The target must be authorized, reachable, and configured for Windows Remote Management with appropriate firewall and authentication policy.




## Create a session




Use an explicit computer name. PowerShell can securely prompt for credentials when required.




Command

```
$session = New-CimSession -ComputerName PC-NAME
```




## Run a read-only query




Pass the session to Get-CimInstance.




Command

```
Get-CimInstance -CimSession $session -ClassName Win32_OperatingSystem | Select-Object Caption, Version, LastBootUpTime
```




## Query disk free space




Filter to local disks and select explicit properties.




Command

```
Get-CimInstance -CimSession $session -ClassName Win32_LogicalDisk -Filter "DriveType=3" | Select-Object DeviceID, Size, FreeSpace
```




## Remove the session




Always close the session when the task is complete.




Command

```
Remove-CimSession -CimSession $session
```




## Do not weaken authentication




Do not disable certificate checks, expose WinRM publicly, or add wildcard TrustedHosts entries to make a failed connection work.




**Verify the result**


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


 


## Related guides




[Command Line

### PowerShell Basics for Beginners

Open PowerShell, discover commands, and work with objects safely. 7 min · Easy](https://screensie.com/knowledge-base/command-line/powershell/powershell-basics/)




[Command Line

### PowerShell File and Folder Basics

List, create, copy, and move files with explicit PowerShell paths. 6 min · Easy](https://screensie.com/knowledge-base/command-line/powershell/powershell-file-basics/)




[Command Line

### PowerShell Network Basics

Inspect IP configuration, adapters, DNS, and TCP connectivity with PowerShell. 7 min · Easy](https://screensie.com/knowledge-base/command-line/powershell/powershell-network-basics/)




[Command Line

### Advanced WMI Operations with PowerShell CIM

Use WQL filters, associations, and CIM sessions without retrieving unnecessary data. 7 min · Advanced](https://screensie.com/knowledge-base/command-line/powershell/advanced-wmi-cim/)




[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

### 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/)
