|
Posted by =?Utf-8?B?T2xpdmllcg==?= on June 16, 2008, 9:34 am
If you were Registered and logged in, you could reply and use other advanced thread options
Dear all,
For an audit I need to know (for a large number a servers) what
accounts/groups are member of the local administrator group. Is there a
simple way to create this list (a script for example)? If so, how?
Any help would be highly appreciated.
O.
|
|
Posted by S. Pidgorny on June 17, 2008, 5:09 am
If you were Registered and logged in, you could reply and use other advanced thread options
"net localgroup [name]" lists members - that's a command line.
Local group access from scripts - standard winnt: provider:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/jan08/hey0107.mspx
--
Svyatoslav Pidgorny, MS MVP - Security, MCSE
-= F1 is the key =-
* http://sl.mvps.org * http://msmvps.com/blogs/sp *
> Dear all,
>
> For an audit I need to know (for a large number a servers) what
> accounts/groups are member of the local administrator group. Is there a
> simple way to create this list (a script for example)? If so, how?
>
> Any help would be highly appreciated.
>
> O.
|
|
Posted by =?Utf-8?B?TWFzdGVycGxhbg==?= on June 18, 2008, 2:04 am
If you were Registered and logged in, you could reply and use other advanced thread options Hi Olivier,
I solved this problem with a logon script. This script puts in a shared
folder named public a .txt file with the computer name and users which are in
the local administrators group and are not domain admins or administrator:
Option Explicit
Const ForAppending = 8
Dim objGroup, strComputer, objMember, WshNetwork, objRecordSet, objFSO,
objFile, strFileName
strComputer = "."
Set WshNetwork = WScript.CreateObject("WScript.Network")
WScript.Echo "Computer Name = " & WshNetwork.ComputerName
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
For Each objMember In objGroup.Members
If objMember.Name <> "Administrator" and objMember.Name <> "Domain Admins"
Then
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFileName = "C:\Public\" & WshNetwork.ComputerName & ".txt"
Set objFile = objFSO.OpenTextFile(strFileName, ForAppending, True)
objFile.WriteLine (objMember.Name)
objFile.Close
End If
Next
Hope this is what you're looking for!
"Olivier" wrote:
> Dear all,
>
> For an audit I need to know (for a large number a servers) what
> accounts/groups are member of the local administrator group. Is there a
> simple way to create this list (a script for example)? If so, how?
>
> Any help would be highly appreciated.
>
> O.
|
| Similar Threads | Posted | | server local admin group | June 29, 2005, 12:49 pm |
| Desk Local Admin - via restriced group | April 13, 2006, 11:15 am |
| Script to list member of Local Admin Group | February 6, 2008, 1:22 pm |
| Local admin right | September 27, 2005, 9:39 am |
| local group from AD | September 5, 2005, 7:10 pm |
| Local group policys | August 20, 2005, 10:00 am |
| Re: cracking local admin account | September 4, 2005, 11:56 am |
| Users and local admin rights?? | November 17, 2005, 9:18 am |
| Re: Installing Software without being Local Admin? | July 25, 2007, 3:45 am |
| Re: Installing Software without being Local Admin? | July 25, 2007, 5:21 am |
|