Tuesday, May 10, 2011

Group Membership – Batch File / Script

This batch file script can be used to list group membership details. You can add all user names (samaccoutname) to the input file -Users.txt. The output will be in the Output.txt file.

I created this script based on this question posted on the TechNet forum

FOR /f %%i in (C:\Users.txt) do (
Echo %%i >> output.txt
Dsquery user –samid %%i |dsget user -memberof –expand >> Output.txt
)

You can also see a PowerShell script on the following link:

http://portal.sivarajan.com/2010/08/list-group-members-in-active.html

5 comments:

Hello Sivarjan,

I followed you guide and it was very helpful.

I want to migrate all the user attributes do I followed kb:
http://support.microsoft.com/kb/937537
reate a file, attribute.vbs for example, that contains:
Set objMig = CreateObject("ADMT.Migration")
objMig.SystemPropertiesToExclude = ""
C:\Windows\SysWOW64>cscript C:\admin\scripts\admtexclusion.vbs

now I don't want to move all of these attributes

Do you know how to roll back this change?

Thanks
Shlomi

A movie critique essay is a type of academic writing that centers on analyzing a given movie and evaluating it according to a variety of aspects and criteria. You can order a movie critique essay from a reliable writing company.

Online psychology paper writing service companies are very keen when it comes to Psychology Research Paper Services for students stuyding psychology studies in order for them to score straight A’s in their custom psychology research papers.

Social science essay writing help has become very popular among students seeking Social Science Writing Services and social science coursework writing services.

Post a Comment

Popular Posts

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More