We recently removed Admin rights from users PC but some users still have local admin rights. Is there a way to develop a report on who has admin local rights on their PC?

1 Comment   [ + ] Show Comment

Comments

  • Hello,

    you can take ispiration from this article as well:
    http://www.itninja.com/blog/view/howto-create-a-custom-inventory-rule-to-show-all-local-administrators
Please log in to comment

Answers

4

http://www.itninja.com/question/i-need-to-list-all-accounts-with-local-admin-right-to-a-machine

Answered 10/16/2013 by: SMal.tmcc
Red Belt

  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment
4

with the report wizard

 

Answered 10/16/2013 by: SMal.tmcc
Red Belt

  • Thanks. How can i get it to give me the local admins on PC's All I get is the users added into a specific domain admin group. Not users who are local admins on a Windows PC
Please log in to comment
1

I found instead of trying to create a sql report that is clean I went to exporting to CSV and bringing into excel and running two macro's that do the cleanup and one other to data sort.

here are the cleanup macros

macro 1:
Sub Cleanup()
'
' Cleanup Macro
' cleans up extra test from export
'
' Keyboard Shortcut: Ctrl+c
'
    Cells.Replace What:= _
        "Alias name     administrators\nComment        Administrators have complete and unrestricted access to the computer/domain\n\nMembers\n\n-------------------------------------------------------------------------------\n\n" _
        , Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:= _
        False, SearchFormat:=False, ReplaceFormat:=False
    Range("B8").Select
    ActiveCell.FormulaR1C1 = _
        "Alias name     administrators\nComment        Administrators have complete and unrestricted access to the computer/domain\n\nMembers\n\n-------------------------------------------------------------------------------\n0\nAdministrator\ndfault\nTMCCADMN\Desktop Local Admins\nTMCCADMN\Domain Admins\nTMCCADMN\ITO PC Admins\nThe command completed successfully.\n\n"
    Cells.Replace What:= _
        "Alias name     administrators\nComment        Administrators have complete and unrestricted access to the computer/domain\n\nMembers\n\n-------------------------------------------------------------------------------" _
        , Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:= _
        False, SearchFormat:=False, ReplaceFormat:=False
    Cells.Replace What:="\nThe command completed successfully.", Replacement:= _
        "", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
        SearchFormat:=False, ReplaceFormat:=False
    Cells.Replace What:="\n\n", Replacement:="", LookAt:=xlPart, SearchOrder _
        :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
    Cells.Replace What:="\n", Replacement:=" username ", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
End Sub

macro 2:
Sub names()
'
' names Macro
' get rid of known names and groups
'
' Keyboard Shortcut: Ctrl+n
'
    Cells.Replace What:="username backup", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Cells.Replace What:="username Administrator", Replacement:="", LookAt:= _
        xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Cells.Replace What:="username dfault", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    Cells.Replace What:="username TMCCADMN\Desktop Local Admins", Replacement:= _
        "", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
        SearchFormat:=False, ReplaceFormat:=False
    Cells.Replace What:="username TMCCADMN\Domain Admins", Replacement:="", _
        LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
        False, ReplaceFormat:=False
    Cells.Replace What:="username TMCCADMN\ITO PC Admins", Replacement:="", _
        LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
        False, ReplaceFormat:=False
End Sub

Then I get a spreadsheet that looks like this:

Answered 10/17/2013 by: SMal.tmcc
Red Belt

  • use the macro record function to create your own and then save them for future reports. It then takes a minute to create a weekly report for the powers that want this.
Please log in to comment
0

The sql code I posted in the other question is just the wizard build selected to view as sql

the above wizard build should give you a report in html that looks like this:

looking at this I see 3 local users (Administrator, backup, homer),2 domain users (tmccadmn\homer and smal), and 3 domain groups (tmccadmn\desktop local admins, domain admins, ito pc admins).

Answered 10/16/2013 by: SMal.tmcc
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity