How to export all distribution groups with specific attributes

Welcome Forums General PowerShell Q&A How to export all distribution groups with specific attributes

Viewing 1 reply thread
  • Author
    Posts
    • #239894
      Participant
      Topics: 1
      Replies: 0
      Points: 13
      Rank: Member

      I’ve tried both Get-DistributionGroup and Get-ADGroup, but what I need is a powershell command to export a CSV or columned report of all my Distribution Groups in AD, with just these Attributes.  I can’t seem to get Location, Department, or Company to show.
      <p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Name</p>
      <p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Location</p>
      <p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Department</p>
      <p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Email Address</p>
      <p style=”margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Company</p>

    • #239909
      Participant
      Topics: 7
      Replies: 2458
      Points: 6,439
      Helping Hand
      Rank: Community MVP

      Rich, welcome to Powershell.org. Please take a moment and read the very first post on top of the list of this forum: Read Me Before Posting! You’ll be Glad You Did!.

      When you post code, error messages, sample data or console output format it as code, please.
      In the “Text” view you can use the code tags “PRE“, in the “Visual” view you can use the format template “Preformatted“. You can go back edit your post and fix the formatting – you don’t have to create a new one.
      Thanks in advance.

      You can use Select-Object to limit the output of a particular cmdlet to certain porperties. Please read the complete help including the examples to learn how to use it.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.