/build/static/layout/Breadcrumb_cap_w.png

K1000: Is there a way to develop a report on who has admin rights on their PC?

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
  • 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 - StockTrader 11 years ago

Answers (4)

Posted by: SMal.tmcc 11 years ago
Red Belt
4

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


Comments:
Posted by: SMal.tmcc 11 years ago
Red Belt
4

with the report wizard

 


Comments:
  • 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 - CEads 11 years ago
Posted by: SMal.tmcc 11 years ago
Red Belt
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:


Comments:
  • 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. - SMal.tmcc 11 years ago
Posted by: SMal.tmcc 11 years ago
Red Belt
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).

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ