Thanks for that sirbounty. Did just the job. Was frustrating me that one. I know it was probably an easy one but I did need the answer quite quickly.
Thanks again
Main Topics
Browse All TopicsI have found a script here on Experts-Exchange which was kindly posted by BlueDevilFan.
I have made some very minor changes to it, but what I want it to do is prompt the user to enter the Domain and Group fields via a prompt input box.
the fields are
strDomain
strGroup
Can anyone help me out. I have given it 500 points because it is quite urgent.
'Script begins here
Dim objGroup, objUser, objFSO, objFile, strDomain, strGroup, Domain, Group
'Change DomainName to the name of the domain the group is in
strDomain = "Domain"
'Change GroupName to the name of the group whose members you want to export
strGroup = "Group"
Set objFSO = CreateObject("Scripting.Fi
'On the next line change the name and path of the file that export data will be written to.
Set objFile = objFSO.CreateTextFile("C:\
Set objGroup = GetObject("WinNT://" & strDomain & "/" & strGroup & ",group")
For Each objUser In objGroup.Members
objFile.WriteLine objUser.Name & " - " & objUser.Class
Next
objFile.Close
Set objFile = Nothing
Set objFSO = Nothing
Set objUser = Nothing
Set objGroup = Nothing
Wscript.Echo "Done"
Wscript.Echo "Please check your destination folder for the output file"
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
it is indeed a wonderful piece of script.
I tried to slightly modify it to report the user's email address instead of the user name.
I could not get it to work
Can anyone with experience please check ???
I tried everything you can think of in line 11.
Instead of
objFile.WriteLine objUser.Name
I tried
objFile.WriteLine objUser.MailAddr
or
objFile.WriteLine objUser.Email
or
objFile.WriteLine objUser.EmailAddress
or
objFile.WriteLine objUser.Mail
Nothing worked!!!
Can anybody help ?
Business Accounts
Answer for Membership
by: sirbountyPosted on 2005-11-01 at 03:53:03ID: 15199281
change
strDomain = "Domain"
to read
strDomain = Inputbox ("Enter the Domain name", "Data needed", "Default domain name")
and
strGroup = "Group"
to
strGroup = InputBox ("Enter the Group name", "Data needed", "Default group name")