Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

A little help with a WMI query

$
0
0

Sorry if this isn’t the best place to post this, but I couldn’t find a better one.

I’m trying to form a wql statement that searches every computer on a domain. I’ve seen where you can use a list of computers in a search, but I’d like for it to be dynamic; that way it will look at new computers as they’re added.

Here’s my example:

gwmi -query "select * from win32_computersystem where model like '20da%'" -cn $allDomainComputers 

but $allDomainComputers would actually be all domain computers

submitted by /u/Th3Harbinger
[link] [comments]

The post A little help with a WMI query appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Trending Articles