Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Powershell Command - email address for all users in a group

Posted on 2014-12-11
6
196 Views
Last Modified: 2014-12-11
need to export all the email addresses in a Active directory Group to csv
0
Comment
Question by:Jorge Ocampo
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:Rajitha Chimmani
ID: 40494318
Run the below command in Exchange Management shell

Get-DistributionGroupMember groupname | Select PrimarySMTPaddress | export-csv filepath -notypeinformation
0
 
LVL 2

Author Comment

by:Jorge Ocampo
ID: 40494334
what does the last "-notypeinformation" do?
0
 
LVL 2

Author Comment

by:Jorge Ocampo
ID: 40494374
i also got this message:

WARNING: By default, only the first 1000 items are returned. Use the ResultSize parameter to specify the n
items returned. To return all items, specify "-ResultSize Unlimited". Be aware that, depending on the actu
items, returning all items can take a long time and consume a large amount of memory. Also, we don't recom
the results in a variable. Instead, pipe the results to another task or script to perform batch changes.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 16

Expert Comment

by:Rajitha Chimmani
ID: 40494377
Usually in csv output it gives you the attribute type in the first line. if you add this it would skip the type information which is not of any use.
0
 
LVL 16

Accepted Solution

by:
Rajitha Chimmani earned 500 total points
ID: 40494380
Use this to avoid the warning

Get-DistributionGroupMember groupname -Resultsize unlimited | Select PrimarySMTPaddress | export-csv filepath -notypeinformation
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40494434
Maybe these will help to export those addresses:

Powershell Script to export AD user to a CSV file?
http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_28356892.html

Powershell: Export active users' firstname, lastname & email address to CSV
http://www.experts-exchange.com/Software/Server_Software/Active_Directory/Q_28022171.html

Export DisplayName, Email Address and Title From AD to CSV File:
http://community.spiceworks.com/how_to/show/86794-powershell-how-to-export-displayname-email-address-and-title-from-ad-to-csv-file
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Read this checklist to learn more about the 15 things you should never include in an email signature.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question