Tech Support > Microsoft Windows > Windows Server > Exporting users that below to a certain group - windows 2003 active directory
Exporting users that below to a certain group - windows 2003 active directory
Posted by Sabo, Eric on June 3rd, 2004


Is there any tool or script that will export the users names from a certain
group from the active directory? I tried ldifde but it exports the cn
names only. I looks at the script center, there was nothing there also.

--
Eric Sabo
NT Administrator


Posted by Eric Weintraub on June 3rd, 2004


On 6/3/04 10:53 AM, in article e#o6TqXSEHA.1732@TK2MSFTNGP09.phx.gbl, "Sabo,
Eric" <sabo_e@cup.edu> wrote:


The easy way would be to go into Active Directory Users and Computers and
right click on the right hand side and use the field chooser to select only
user names

The right click and export.

If you have a lot of OU's and you use 2003 then go to AD Query at the top
select the people you by defining then export that.

It might now be a good solution but I wanted to put in my 10 cents.

Cheers

J5 - Eric A. Weintraub
Sr. Network Administrator
ScriptLogic Corp
--



Posted by Marin Marinov on June 3rd, 2004


In article <e#o6TqXSEHA.1732@TK2MSFTNGP09.phx.gbl>, sabo_e@cup.edu
says...
dsget group "CN=Backup Operators,ou=Test,dc=microsoft,dc=com" -members >
C:\Members.txt

will list all members of the Backup Operators group into the file C:
\Members.txt. You can also customize the output, see the online help
('dsget group /?').

HTH
--
Cheers,
Marin Marinov
MCT, MCSE 2003/2000/NT4.0,
MCSE:Security 2003/2000, MCP+I
-
This posting is provided "AS IS" with no warranties, and confers no
rights.

Posted by Sabo, Eric on June 3rd, 2004


Thanks but that still produces them in schema format.

Is there any way else?

"Marin Marinov" <mlmarinov@askme.ca> wrote in message
news:MPG.1b291fe023dcbb99989867@msnews.microsoft.c om...


Posted by Marin Marinov on June 3rd, 2004


In article <#SHR1CZSEHA.3012@tk2msftngp13.phx.gbl>, sabo_e@cup.edu
says...
Well, in Notepad you can search and replace the portion after the name
with nothing and also replace "CN=" with nothing and there you go
Anyway, you can also use:
- net group "Domain Admins"
- showmbrs.exe from Win2K Resource Kit
- this script:

Set objGroup = GetObject _
("LDAP://cn=Domain Admins,cn=Users,dc=sample,dc=com")

For Each Member in objGroup.Members
arrTmp = Split(Member.Name, "=",-1,1)
Wscript.Echo arrTmp(1)
Next

- a custom application

HTH
--
Cheers,
Marin Marinov
MCT, MCSE 2003/2000/NT4.0,
MCSE:Security 2003/2000, MCP+I
-
This posting is provided "AS IS" with no warranties, and confers no
rights.