Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Make Multiple WMI Queries to Remote Machine

$
0
0

Summary: Learn how to make multiple WMI queries to a remote machine more efficient.

Hey, Scripting Guy! Question How can I make running multiple WMI queries against a remote machine more efficient?

Hey, Scripting Guy! Answer Create a CIM session with New-CimSession, and use that in your calls instead of a computer name:

$sess = New-CimSession –Computername server02

Get-CimInstance –ClassName Win32_OperatingSystem –CimSession $sess


Viewing all articles
Browse latest Browse all 3333

Trending Articles