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

7 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.

Your blog is very informative, finally, I found exactly what I want. Paypal is an excellent service for online payments but lots of its users confront issues while they access Paypal. If you want to resolve your problems then must visit Paypal klantendienst.

Your blog is very informative and interesting to read, finally, I found exactly what I searching for. There are lots of users of Macfee antivirus in the world because of its features and easy interface. If you want to explore more interesting facts about Mcafee antivirus or want to resolve your technical issues then must visit Mcafee ondersteuning Nederland.

Hi, Thank you for sharing such a good and valuable information,It is very important for me. Gmail is the worldwide used email service but sometimes user faces some problems in it. If you want to get some information about the Gmail then you can visit Gmail-tili.

Unbelievable blog! This blog provides a brief introduction which is very helpful for me. Instagram is the most usable platform in the world because of its latest features but the user some time confronts some issues on Instagram. For more information, you can visit Instagram yhteystiedot.

Post a Comment

Popular Posts

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More