Video Screencast Help

Local admin rights

Created: 02 Mar 2012 • Updated: 02 Mar 2012 | 8 comments
This issue has been solved. See solution.

Is there a report that can show me each PC's local\Administrator groups members (domain or local accounts).

I can see the 'count of users with admin rights' but it seems to show every account as a domain account. theres definitely some local accounts on users PCs that are in the local admin group.



edit: just tested this and it doesn't distinguish between domain or local accounts (which isn't good as far as I can see) It shows them all as listed under domain.

 This is the info that would be good to have

Computername, username in Admin group, account type (local or domain)  - that would be ideal.

Comments 8 CommentsJump to latest comment

Mistral's picture

Create your own report. Just add the two fields from the "Admin Group Members" data class.

Here is the raw sql query (Domainname=Machinename=Local):

DECLARE @v1_TrusteeScope nvarchar(max)
   SET @v1_TrusteeScope = N'%TrusteeScope%'
   [vri2_Computer].[Guid] AS [_ItemGuid],
   [dca3_UG Admin Group Members].[Domain],
   [dca3_UG Admin Group Members].[Member Name]
   [vRM_Computer_Item] AS [vri2_Computer]
      JOIN [Inv_UG_Admin_Group_Members] AS [dca3_UG Admin Group Members]
         ON ([vri2_Computer].[Guid] = [dca3_UG Admin Group Members].[_ResourceGuid])
      ([vri2_Computer].[Guid] IN (SELECT [ResourceGuid] FROM [ScopeMembership] WHERE [ScopeCollectionGuid] IN (SELECT [ScopeCollectionGuid] FROM dbo.fnGetTrusteeScopeCollections(@v1_TrusteeScope))))

BugTastic's picture

error when running the SQL below

Msg 208, Level 16, State 1, Line 3

Invalid object name 'vRM_Computer_Item'.

Sally5432's picture

thanks, I added a report for this - quick and easy.

Don't forget to mark posts as helpful if they are, and mark answers as solutions.

Mistral's picture

Woot? Which version you have?

This view should exist ... long ... at least since 7.0?

Anyway. Build your own report.

1. Create a New -> Computer Report

2. Go to the "Fields" tab and add [Admin Group Members].[Domain] and [Admin Group Members].[Member Name] (they will be polulated by a User Inventory from Inventory Solution)

3. Convert it to SQL

4. Replace LEFT OUTER with INNER (on the join ... might even be right outer ... cannot remember)

5. Save Changes

BugTastic's picture

Hi, I got version 7. followed your steps to create new report, and it worked.
It was 'Right Outer' to change.

Thanks for your help and time/


Mistral's picture

Was a pleasure.

Im curious about the difference in the query now :)

What does your query use instead of vRM_Computer_Item?

BugTastic's picture

I was running it in SQL management studio and ran it against the wrong DB....

Sorrrrry :-) schoolboy error. (which I am a master of)



Mistral's picture

lolz :) and some relieve ... have a nice weekend :)