Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Cannot add a new UPN-Suffix in a trusted domain/Forest with powershell

$
0
0

Hi everyone

I´m trying to add a new UPN suffix, in a different forest/domain than my multi tenant Exchange 2013 domain. There is a transitive trust between the two domains/forests.

 

Import-Module activedirectory

New-PSDrive–Name Domain –PSProvider ActiveDirectory –Server ‘DC01.domain.local’ –credential (Get-Credential‘domain.local\administrator’) –root‘//RootDSE/’

 

$CustomerName = Read-Host"Add new UPN Suffix)"

Set-ADForest-Identity domain.local -UPNSuffixes @{Add="$CustomerName"}

A “Get-ADForest -Identity domain.local –Server ‘DC01.domain.local’| fl” works fine, but when I run the above powershell commands, I get this error:

 

****************************************************************

Name           Used (GB)     Free (GB) Provider      Root                                                CurrentLocation

----           ---------     --------- --------      ----                                                ---------------

Domain                                 ActiveDire... //RootDSE/                                                        

 

Set-ADForest : A referral was returned from the server

At line:12 char:1

+ Set-ADForest -Identity domain.local -UPNSuffixes @{Add="$CustomerName"}

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ResourceUnavailable: (domain.local:ADForest) [Set-ADForest], ADReferralException

    + FullyQualifiedErrorId : ActiveDirectoryServer:8235,Microsoft.ActiveDirectory.Management.Commands.SetADForest

****************************************************************

 

Can anyone help

Best Regards

Peter
A-One Solutions


Viewing all articles
Browse latest Browse all 6937

Trending Articles