troubleshooting Question

Nested SELECT for WMI filter query

Avatar of kevaroo
kevarooFlag for United Kingdom of Great Britain and Northern Ireland asked on
Active DirectoryVB Script
5 Comments1 Solution2529 ViewsLast Modified:
Hi,

I need to create a WMI filter for a GPO so that it is only applied if the logged on user is a local administrator on the machine.

I know that the respective queries for the collection of local admin users and logged on users are as follows:

SELECT * FROM Win32_GroupUser WHERE GroupComponent = " & Chr(34) & "Win32_Group.Domain=\" & Chr(34) & "BUILTIN\" & Chr(34) & ",Name=\" & Chr(34) & "Administrators\" & Chr(34) & Chr(34)

SELECT * FROM Win32_LoggedOnUser

But I do not know how to combine these in to 1 single WMI query.

Is this possible? Is there a method for nesting select statements?

Thanks

Marcus
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros