I 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
leSystemOb
ject")
'On the next line change the name and path of the file that export data will be written to.
Set objFile = objFSO.CreateTextFile("C:\
stefan\fin
al" & strGroup & " - Members.txt")
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"
Start Free Trial