Question : VBS Code Assistance

Hi All,

I do not have the skill required to complete my request and I am looking for some who does to help me.

I have been asked to provide all groups members in a list as well as all shares and what groups and users they contain. There are a significant amount of users and groups so I am looking for a script to simplify the process.

I found this script which asks for the group name to be entered which works but I would like the below script to read a text file that contains all of the group names in it and parse each group to a text file into a directory called C:\Members

Essentially I need all of the groups members output to a separate text file for later review.

Thanks

AI-SYD



Thank You.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
'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", "Default domain name")
'Change GroupName to the name of the group whose members you want to export
strGroup = InputBox ("Enter the Group name", "Data needed", "Default group name")
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"

Answer : VBS Code Assistance

Hi Kenny,

You can use a GPO to apply static (the same) ntfs permissions to a to directories as per this link: http://technet.microsoft.com/en-us/library/cc756952(WS.10).aspx

Or conversely, you can use SubinACL (part of the windows support tools to find and replace permissions): syntax provided here:http://www.robvanderwoude.com/subinacl.php
Random Solutions  
 
programming4us programming4us