We help IT Professionals succeed at work.

Use a wmi query in item-level targeting

305 Views
2 Endorsements
Last Modified: 2018-11-02
I'd like to use wmi querys to item-level target group policy preferences.  Nothing I do is working.  Not sure how to test.  Could someone give me an example?  below is when I'm trying to use to test currently.

Query:  Select DisplayName from Win32_Service Where Name ='Print Spooler'
Namespace:  Root\cimv2
Property:  Print Spooler
Comment
Watch Question

MaheshArchitect
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
what is your requirement?

Author

Commented:
I'm just testing.  I guess my requirement in this test is just that it finds the print spooler service.
But really, the requirement would be that the service is running.
CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
it works!
Thankyou.
Much appreciated.
For writing querys like this I'm finding the below to be very useful since I'm new to this.
WMI Code Creator
https://www.microsoft.com/en-us/download/details.aspx?id=8572
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.