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:



Hello Sivarjan,

I followed you guide and it was very helpful.

I want to migrate all the user attributes do I followed kb:
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?


Post a Comment

Popular Posts


Twitter Delicious Facebook Digg Stumbleupon Favorites More