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?