Client Management Suite

 View Only
  • 1.  Local admin rights

    Posted Mar 02, 2012 05:29 AM

    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.

    Cheers

    Joe.

    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.



  • 2.  RE: Local admin rights

    Posted Mar 02, 2012 07:14 AM

    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%'
    SELECT
       [vri2_Computer].[Guid] AS [_ItemGuid],
       [vri2_Computer].[Name],
       [dca3_UG Admin Group Members].[Domain],
       [dca3_UG Admin Group Members].[Member Name]
    FROM
       [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])
    WHERE
       (
          ([vri2_Computer].[Guid] IN (SELECT [ResourceGuid] FROM [ScopeMembership] WHERE [ScopeCollectionGuid] IN (SELECT [ScopeCollectionGuid] FROM dbo.fnGetTrusteeScopeCollections(@v1_TrusteeScope))))
       )



  • 3.  RE: Local admin rights

    Posted Mar 02, 2012 07:23 AM

    error when running the SQL below

     

    Msg 208, Level 16, State 1, Line 3

    Invalid object name 'vRM_Computer_Item'.



  • 4.  RE: Local admin rights
    Best Answer

    Posted Mar 02, 2012 07:32 AM

    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



  • 5.  RE: Local admin rights

    Posted Mar 02, 2012 07:41 AM

    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/

     

    Joe.



  • 6.  RE: Local admin rights

    Posted Mar 02, 2012 07:46 AM

    Was a pleasure.

    Im curious about the difference in the query now :)

    What does your query use instead of vRM_Computer_Item?



  • 7.  RE: Local admin rights

    Posted Mar 02, 2012 07:59 AM

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

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

    Cheers

    Joe.



  • 8.  RE: Local admin rights

    Posted Mar 02, 2012 10:03 AM

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



  • 9.  RE: Local admin rights

    Trusted Advisor
    Posted Mar 02, 2012 11:20 AM

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