Technical Blog

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 22 April 2010

Export Distribution List Members (from Active Directory to Text)

Posted on 17:05 by Unknown
Here is the Script to Export the members from DL

On Error Resume Next

WScript.Echo Now()
Set objGroup = GetObject _
("ldap://CN=testgroup,OU=groupname,DC=domain,dc=com")
objGroup.GetInfo
arrMemberOf = objGroup.GetEx("member")
WScript.Echo "Members:"
For Each strMember in arrMemberOf
WScript.echo strMember
Next

Copy the above code and save it in Notepad. Save this file as "DLmembers.vbs"

Execute from Command mode

c:\>cscript dlmembers.vbs >c:\output.txt
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Scripting | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • SQL Interview Questions
    What is Database engine? The Database Engine is the core service for storing, processing, and securing data. What is Quorum Disk? In the eve...
  • Batch File to Map network drive.
    First, open up Notepad or your favorite text editor. Next, copy the commands as shown below and paste them into the file. Don't forget ...
  • How to Move VM from One ESX to another ESX server
    follow this: http://www.heuers.org/wp/?p=264
  • MOM 2005 Reporting - Grooming and Shrinking the Reporting database
    Follow the below link: ( very useful- it worked for me) http://ops-mgr.spaces.live.com/blog/cns!3D3B8489FCAA9B51!147.entry
  • SCCM / SMS Interview Questions
    Can you change a secondary site to a primary site? No. A secondary site is always a secondary site. It cannot be upgraded, moved, or changed...
  • Export Distribution List Members (from Active Directory to Text)
    Here is the Script to Export the members from DL On Error Resume Next WScript.Echo Now() Set objGroup = GetObject _ ("ldap://CN=testgro...
  • You can force replication between DCs
    -> Start Active Directory Sites and Services. -> Expand the Sites. -> Expand the site that contains the DCs. (The default site Defa...
  • Find Dell Service Tag from Command mode in windows
    Following WMIC command will give make and model number along with service tag. C:\>wmic csproduct get vendor,name,identifyingnumber Ident...
  • What Information is Replicated in Active Directory
    ->When an object is created. ->When an object is deleted. ->When an object is moved. ->When an object is changed or modified. AD...
  • SCOM 2007 / MOM 2005 Interview Questions
    What is the port number for SNMP? 161 What is the Default port number for SQL? 1433 How do u migrate from MOM 2005 to SCOM 2007? Only side b...

Categories

  • Active Directory
  • Citrix
  • Downloads
  • Exchange Server
  • HPSA
  • IIS
  • SCCM
  • SCOM 2007
  • Scripting
  • SQL
  • Storage
  • VMWARE
  • Windows
  • Windows 7
  • Windows Server 2003
  • Windows Server 2008

Blog Archive

  • ►  2011 (25)
    • ►  November (5)
    • ►  July (1)
    • ►  June (1)
    • ►  May (3)
    • ►  April (12)
    • ►  March (3)
  • ▼  2010 (12)
    • ►  June (1)
    • ►  May (3)
    • ▼  April (8)
      • VMware ESX 3.5 Update to Build Number
      • Step by step instructions to install Vmware ESX Se...
      • Export Distribution List Members (from Active Dire...
      • Batch File to Map network drive.
      • How to Move VM from One ESX to another ESX server
      • Active Directory Interview Questions
      • VMware Interview Questions ESX..
      • SCOM 2007 / MOM 2005 Interview Questions
  • ►  2009 (24)
    • ►  November (1)
    • ►  July (1)
    • ►  June (16)
    • ►  May (2)
    • ►  March (4)
Powered by Blogger.

About Me

Unknown
View my complete profile