PREMNAIR'S Blog

"..Unnatural work produces too much stress.."

Add UPN Suffixes to Active Directory users

UPN (User Principal Name) Suffixes: You can use Active Directory Domains and Trusts to add user principal name (UPN) suffixes for the existing user account. The default UPN suffix for a user account is the Domain Name System (DNS) domain name of the domain that contains the user account. You can add alternative UPN suffixes to simplify administration and user logon processes by providing a single UPN suffix for all users. The UPN suffix is used only within the Active Directory forest, and it is not required to be a valid DNS domain name.

To perform this procedure, you must be a member of the Domain Admins group or Enterprise Admins group in Active Directory Domain Services (AD DS), or you must have been delegated the appropriate authority. For using the appropriate accounts and group memberships, Click here.

To add UPN suffixes

  1. To open Active Directory Domains and Trusts, click Start, click Administrative Tools, and then click Active Directory Domains and Trusts.
  2. In the console tree, right-click Active Directory Domains and Trusts, and then click Properties.
  3. On the UPN Suffixes tab, type an alternative UPN suffix for the forest, and then click Add.

The procedure forusing the Active Directory module for Windows PowerShell. To open the Active Directory module, click Start, click Administrative Tools, and then click Active Directory Module for Windows PowerShell.

Sample AD PowerShell command to update UPNs in bulk

Get-ADUser-Filter * -properties homemdb | where {$_.homemdb -ne $null} | ForEach-Object ($_.SamAccountName) {$CompleteUPN = $_.SamAccountName + “@contoso.com”; Set-ADUser -Identity $_.DistinguishedName -UserPrincipalName $CompleteUPN}

The above script:
·        Gets all users with something in their homemdb attribute (i.e. mailbox users)
·        Creates a temporary variable called $completeUPN which is a combination of every user’s samaccountname plus @contoso.com
·        Sets each user to this new upn

Enjoy!!!

Advertisements

March 18, 2012 - Posted by | Active Directory, ADFS, Cloud Computing, DIR Sync, Microsoft, Office 365, Power Shell, Software, Windows Server 2008 R2 | , , , ,

1 Comment »

  1. […] The UPN must be set and known by the user. Click here to know how to do it. […]

    Pingback by Office 365 – Cloud configuration – Live « Microsoft Office 365 @ Middle East Region | April 3, 2012 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: