I am looking for a function that returns all the administrators of a given
workstation. Does somebody know?
Man-wai Chang ToDie (33.6k) - 29 Jul 2008 08:22 GMT
> I am looking for a function that returns all the administrators of a given
> workstation. Does somebody know?
You meant listing the members of a group?

Signature
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04.1) Linux 2.6.26
^ ^ 15:19:01 up 4:45 1 user load average: 1.00 1.00 1.00
? ? (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/
WP - 29 Jul 2008 13:03 GMT
Yes, I want to know the members of the local administrator's group of a
machine , not the administrator's group of the domain.
>> I am looking for a function that returns all the administrators of a
>> given workstation. Does somebody know?
>
> You meant listing the members of a group?
Michel Roy - 29 Jul 2008 19:26 GMT
objGroup = GetObject("WinNT://./Administrators")
For Each objUser in objGroup.Members
?objUser.Name
Next
> I am looking for a function that returns all the administrators of a given
> workstation. Does somebody know?
Christof Wollenhaupt - 29 Jul 2008 19:52 GMT
Hi,
>I am looking for a function that returns all the administrators of a given
>workstation.
Why do you need such a list? I'm asking, because being in the Administrator
group does not mean that you have all rights. Also, you can create user
accounts with the same priviledges as an administrator that is in a
different group. Finally, on machines that follow common security practices
or use one of the security scanners, you rarely fiind more than two local
administrators.

Signature
Christof