RE: Script to extract users and groups from AD
- From: Eng <eugeniotalarico@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 08:45:01 -0700
Try to look something like the script below.
bye
Eng
Author: Eugenio Talarico
mailto: eugeniotalarico@xxxxxxxxxxxxxxxxxxxx
Description:
Dump users from domain. Usage: cscript //nologo SCRIPT_NAME.VBS >
OUTPUTFILE.TXT Take the outputfile.txt and import into excel; notice that the
! is needed to separate the colum during the import process. With this you
can dump the user and groups from the source domain.
Script:
'BEGIN SCRIPT
'** By Eugenio Talarico
'** mailto: eugeniotalarico@xxxxxxxxxxxxxxxxxx
Option Explicit
Dim objDomain, objUser, objGroup
Set objDomain = GetObject("WinNT://PUT_HERE_DOMAIN_NAME")
objDomain.Filter = Array("user")
For Each objUser In objDomain
Wscript.Echo "User:! " & objUser.Name & " ! FULL_NAME:! " &
objuser.fullname & " ! Description:! " & objuser.description
Next
objDomain.Filter = Array("group")
For Each objGroup In objDomain
Wscript.Echo "Group: " & objGroup.Name
For Each objUser In objGroup.Members
Wscript.Echo "Member: " & objUser.Name
Next
Next
'END Script
.
- References:
- Script to extract users and groups from AD
- From: Shaun Pillay
- Script to extract users and groups from AD
- Prev by Date: Re: is there a free net send tool to send message to distirbution or security grp ?
- Next by Date: Re: Remove XP Local Profile
- Previous by thread: Script to extract users and groups from AD
- Next by thread: Re: Script to extract users and groups from AD
- Index(es):
Relevant Pages
|