NEW-AGROUP How to add Mail attribute

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

 

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="testgroupmail@domain.com"}

Hope this helps

Hi Doug

 

Thank you That worked great.