adkwinadmin
asked on
bulk modify displayname property on distribution groups in Exchange Management Shell
I am wanting to change the displayname (and only the displayname) of all my distribution groups in Exchange 2007 but don't want to do it by hand.
For instance we currently have a distribution group named "sales" and I want to prepend and @ and a space to create "@ sales" for the displayname. I don't want to change anything about the displayname, other than prepending the additional charachters.
If any powershell/ Exchange Managment Shell scripting guru could help, that would be great.
For instance we currently have a distribution group named "sales" and I want to prepend and @ and a space to create "@ sales" for the displayname. I don't want to change anything about the displayname, other than prepending the additional charachters.
If any powershell/ Exchange Managment Shell scripting guru could help, that would be great.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
and what if a person wanted to do that but for only distributiongroups with a customattribute10 -eq 50 ?
maybe something like
$grp = Get-DistributionGroup | ? { $_.CustomAttribute10 -eq "50"}
foreach ($g in $grp) { $disp = "@ " + $g.DisplayName; Set-DistributionGroup $g -DisplayName $disp}
$grp = Get-DistributionGroup | ? { $_.CustomAttribute10 -eq "50"}
foreach ($g in $grp) { $disp = "@ " + $g.DisplayName; Set-DistributionGroup $g -DisplayName $disp}
ASKER