Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are setting up ADFS for identity federation with a Microsoft Online service. The documentation states that "Groups without a displayname will NOT get synchronized..." We have over 250 groups that have a blank displayname attribute.

Does anyone know of a way to set the displayname attribute to match the cn attribute for all groups where the displayname is blank?

share|improve this question
Could also use name or sAMAccountName attributes to update displayname. – Daniel Lucas Dec 18 '12 at 14:42
up vote 8 down vote accepted

Using the Microsoft Powershell commands you can do this. You need to import the AD module if you do not have it already imported into your current powershell session.

Get-ADGroup -filter * -Properties Displayname | Where-Object {$_.displayname -eq $null} | ForEach-Object {Set-ADGroup -Identity
$_ -DisplayName $_.SamaccountName}
share|improve this answer
Worked like a charm. Thanks! – Daniel Lucas Dec 18 '12 at 15:54
Great. Glad I could help. – Mike Dec 19 '12 at 11:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.