Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.
'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 = Inputbox ("Enter the Domain name", "Data needed", "domainname") 'Change GroupName to the name of the group whose members you want to export strGroup = InputBox ("Enter the Group name", "Data needed", "groupname") Set objFSO = CreateObject("Scripting.FileSystemObject") 'On the next line change the name and path of the file that export data will be written to. Set objFile = objFSO.CreateTextFile("C:\" & 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 the c: for your output file"
|How to create a duplicate finder Application||9||71|
|Computer crashes, following error message in event manager||5||40|
|VBA/SQL - Connect to SQL server and pull data||4||38|
|maro to copy and paste from one worksheet to another based on a condition||11||24|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
11 Experts available now in Live!