WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

who is local admin in the domain clients

 
   Home -> Windows Other -> Group Policy RSS
Next:  Prioritize Startup  
Author Message
guzin_g

External


Since: Aug 20, 2008
Posts: 1



(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?

Thank you.

Regards.
Back to top
Login to vote
Meinolf Weber

External


Since: Aug 27, 2007
Posts: 720



(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

' Output to the log

oLog.WriteLine oComputer.Name + tab + _
AdminUsers + tab + _
AdminGroups + tab + _
PowerUsers + tab + _
PowerGroups

Next

' Close log file handle, open the log in Notepad

oLog.Close
oShell.Run "notepad.exe """ + LogPath + """"

' Clean up

Set ADComputers = Nothing
Set oADInfo = Nothing
Set oFso = Nothing
Set oLog = Nothing
Set oLog = Nothing
Set oShell = Nothing

'--------------------------------------------------------------------------------


Best regards

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.
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Windows Other -> Group Policy 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
Categories:
 Windows XP
 Windows Vista
  Windows Other
 Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET