NEW-AGROUP How to add Mail attribute

Welcome Forums General PowerShell Q&A NEW-AGROUP How to add Mail attribute

Viewing 2 reply threads
  • Author
    Posts
    • #232009
      Participant
      Topics: 34
      Replies: 110
      Points: 565
      Rank: Major Contributor

      Wrote a small script to create a new-adgroup

       

      Import-Csv “C:\Util\Input\efaxgroups.csv” | ForEach-Object {

      $gname = $_.”Name”
      $manager = $_.”Manager”
      $OU = $_.”OU”

      new-adgroup -Name “$gname” -ManagedBy “$manager” -Path “OU=$OU,OU=FDU-Security-Groups,OU=FDU-Groups,DC=root,DC=fdu,dc=edu” -Description “Provides users in to Xmedius Fax Service” -GroupScope Global -GroupCategory Security

      Add-ADGroupMember -Identity Efax-Authorized-Users -Members “$gname”
      }

      On a AD Group

       

      On the General Tab   you have Group Name

      Description

      E-Mail

      Email which in the Attribute Editor  is mail

      When I looked up the Doc on New-Adgroup I do not see the way to modify this or add it

      Any ideas?

       

      Thank you

      Tom

       

    • #232012
      Participant
      Topics: 3
      Replies: 421
      Points: 1,479
      Helping Hand
      Rank: Community Hero

      Hi Tom,

      You may use Set-ADObject to change this attribute. You can use the pipeline to pass the group in as well.

       

      Get-ADGroup testgroup | Set-ADObject -Add @{mail="[email protected]"}
      

      Hope this helps

    • #232027
      Participant
      Topics: 34
      Replies: 110
      Points: 565
      Rank: Major Contributor

      Hi Doug

       

      Thank you That worked great.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.