Re: enumerate Domain Users



I am always surprised how much time people waste to educate others :-)

Mr. horse: if you feel responsible for saving the world - then let people at
least know WHERE my abhorrent "multi-posted" (2 NGs) questions was answerd :

microsoft.public.scripting.vbscript (thx to the guy there....)


"Pegasus (MVP)" <I.can@xxxxxxxxxx> schrieb im Newsbeitrag
news:%23eCxADNbIHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
Multi-posted and answered in great detail elsewhere - see
here why multi-posting is not good:
http://www.blakjak.demon.co.uk/mul_crss.htm


"Steffen Meier" <test@xxxxxxxx> wrote in message
news:uD$xLeMbIHA.1168@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I need a VBS script that can enumerate all Users of a win2000 and win2003
domain.
I would need the following 3 attributes from the ADS for each Domainuser
:

sAMAccountname,Description,Department


I have tried some LDAP queries... but I dont get these 3 attributes....

the code I use enumerates all Users for a group, but I dont get the 3
attributes that I need.
Also I need all users of the domain - not of a group (though I think each
Domain user is by default in the Domain Users group...?)

Currenty I use something like this:

strContainer = (points to Domain Users Group)
Set objRootDSE = GetObject("LDAP://RootDSE";)
Set objGroup = GetObject ("LDAP://"&; strContainer)

objGroup.getInfo

arrMemberOf = objGroup.GetEx("member")

wscript.echo strContainer & ":"
For Each strGroupMember in arrMemberOf
wscript.echo strGroupMember
Next


How should I modify this code - or write some new code, that enumerats
all Domain users with the attributes that I need?
(Would be perfect if I dont have to hardcode the domain name..but use
DefaultDomain....)

thank you





.



Relevant Pages

  • Re: enumerate Domain Users
    ... here why multi-posting is not good: ... I need a VBS script that can enumerate all Users of a win2000 and win2003 ... but I dont get these 3 attributes.... ... Domain user is by default in the Domain Users group...?) ...
    (microsoft.public.scripting.wsh)
  • Re: Printer permissions ??
    ... why "full access" they dont have Manage printers? ... User2 - Help Desk Users, Managers, Domain Users, Domain Admins ... LaserJetA - ...
    (microsoft.public.windows.server.active_directory)
  • Re: Prevent Domain Users from Browsing Active Directory OUs
    ... Because i work in a university and i dont want students to have access ... to computer names and user accounts for staff and etc.... ... >> Is there anyway to to prevent domain users from viewing and browsing ... >> active directory icon located in My network places. ...
    (microsoft.public.win2000.networking)
  • Printer permissions ??
    ... why "full access" they dont have Manage printers? ... User2 - Help Desk Users, Managers, Domain Users, Domain Admins ...
    (microsoft.public.windows.server.active_directory)
  • Re: enumerate Domain Users
    ... solved elsewhere, hence the desire to point out that multi-posting is, ... I need a VBS script that can enumerate all Users of a win2000 and ... but I dont get these 3 attributes.... ... each Domain user is by default in the Domain Users group...?) ...
    (microsoft.public.scripting.wsh)

Loading