(Msg. 1) Posted: Wed Aug 20, 2008 1:24 am
Post subject: who is local admin in the domain clients Archived from groups: microsoft>public>win2000>group_policy (more info?)
Hi,
I want to check who is local admin in the domain clients. Can you help
me?
(Msg. 2) Posted: Wed Aug 20, 2008 8:42 am
Post subject: Re: who is local admin in the domain clients [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Hello guzin_g RemoveThis @hotmail.com,
From another posting:
You can use the script below to generate a report on local Administrators
and Power Users. Copy it into a text file and rename it with the .vbs extension.
Run it from the domain controller. For the computers you are auditing, you
must have Administrator privileges and be able to access the computer's RPC
ports. The output is tab delimited and can be opened in Excel.
Set oADInfo = CreateObject("ADSystemInfo")
Set oFso = WScript.CreateObject("Scripting.Filesystemobject")
Set oShell = WScript.CreateObject("Wscript.Shell")
LogPath = oShell.SpecialFolders("MyDocuments") + "\Privileged Local
User Audit.txt"
AdsiPath = "WinNT://" + oADInfo.DomainShortName
tab = Chr(9)
' Connect to Active Directory
Set ADComputers = GetObject(AdsiPath)
ADComputers.Filter = Array("Computer")
' Open the log file
Set oLog = oFso.CreateTextfile(LogPath, true)
oLog.WriteLine "Privileged Local Users on Computers in the " + _
oADInfo.DomainDNSName + _
" domain."
oLog.WriteLine Now
oLog.WriteLine ""
oLog.WriteLine "Computer" + tab + _
"Administrators" + tab + _
"Administrators Groups" + tab + _
"Power Users" + tab + _
"Power Users Groups"
' Check each computer
For Each oComputer in ADComputers
' Trap any errors in case the user is unauthorized, the computer is
inaccessible, etc.
On Error Resume Next
' Get the Administrators users and groups
AdminUsers = ""
AdminGroups = ""
Set objGroup = GetObject("WinNT://" & oComputer.Name & "/
Administrators")
If Not(Err.Number = 0) Then
AdminUsers = Err.Number
AdminGroups = Err.Number
End If
For Each objUser In objGroup.Members
If objUser.Class = "User" Then
AdminUsers = AdminUsers + objUser.Name + "; "
else
AdminGroups = AdminGroups + objUser.Name + "; "
end if
Next
' Get the Power Users users and groups
PowerUsers = ""
PowerGroups = ""
Set objGroup = GetObject("WinNT://" & oComputer.Name & "/Power
Users")
If Not(Err.Number = 0) Then
PowerUsers = Err.Number
PowerGroups = Err.Number
End If
For Each objUser In objGroup.Members
If objUser.Class = "User" Then
PowerUsers = PowerUsers + objUser.Name + "; "
else
PowerGroups = PowerGroups + objUser.Name + "; "
end if
Next
Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm
> Hi,
>
> I want to check who is local admin in the domain clients. Can you help
> me?
>
> Thank you.
>
> Regards.
>
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum