Is it possible to create a dynamic group where the current user of a workstation is a member of the local administrators group?

I only want the dynamic group to show computers where the current user is also a member of the local administrators group. Something like below. Is it possible to use a variable to get the current user?

1

Comments

2 comments
Date Votes
  • Unfortunately, filters cannot compare fields to each other, only static data, Variables, and other collections.

    However, a SQL Report should be able to do that.

    1
  • I've never messed around with SQL reports until your comment, but this was easy, thanks.

    For anyone who might hit this from Google, here is the query I created:

    SELECT [Computers].[Name],
        [Computers].[CurrentUser],
        [LocalGroupMembers].[GroupName],
        [LocalGroupMembers].[UserDomain],
        [LocalGroupMembers].[UserName]
    FROM [Computers]
    INNER JOIN [LocalGroupMembers] ON [Computers].[ComputerId] = [LocalGroupMembers].[ComputerId]
    WHERE [LocalGroupMembers].[GroupName] = 'Administrators'
        AND [LocalGroupMembers].[UserDomain] || '\' || [LocalGroupMembers].[UserName] = [Computers].[CurrentUser]

     

    2

Please sign in to leave a comment.

Didn't find what you were looking for?

New post