PowerShell cmdlet/parameter combinations are unsuccessful in Exchange Server 2016

%3CLINGO-SUB%20id%3D%22lingo-sub-1491887%22%20slang%3D%22en-US%22%3EPowerShell%20cmdlet%2Fparameter%20combinations%20are%20unsuccessful%20in%20Exchange%20Server%202016%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1491887%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%20I%20notice%20this%20weird%20error%20from%20Exchange%20powershell%20while%20running%20this%20cmdlet%3A-%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGet-MailboxJunkEmailConfiguration%20-Identity%20%22user%40contoso.com%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EError%3A-%3C%2FP%3E%3CP%3EError%20on%20proxy%20command%20'Get-MailboxJunkEmailConfiguration%20-Identity%3A'user%40contoso.com''%20to%20server%20Ex01.corp.contoso.com%3A%20Server%20version%3CBR%20%2F%3E15.01.1713.0000%2C%20Proxy%20method%20RPS%3A%3CBR%20%2F%3EThe%20operation%20couldn't%20be%20performed%20because%20object%20'Ex02.corp%40contoso.com'%20couldn't%20be%20found%20on%20'ADcorp.france.contoso.com'..%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BGet-MailboxJunkEmailConfiguration%5D%2C%20CmdletProxyException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.Exchange.Configuration.CmdletProxyException%2CMicrosoft.Exchange.Management.StoreTasks.GetMailboxJunkEmailConfiguration%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20following%20correctly%20applies%20to%20my%20Exchange%20environment%3A-%3C%2FP%3E%3CUL%20class%3D%22ng-scope%22%3E%3CLI%3E%3CSPAN%3EMicrosoft%20Exchange%20Server%202016%20environment%20that%20contains%20two%20or%20more%20mailbox%20servers.%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EActive%20Directory%20Forest%20contains%20two%20or%20more%20domains.%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20class%3D%22x-hidden-focus%22%3EExchange%20Servers%20and%20user%20objects%20are%20located%20in%20different%20Active%20Directory%20domains.%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20class%3D%22x-hidden-focus%22%3EI%20manage%20recipients%20through%20Exchange%20Management%20Shell%20(EMS)%20by%20setting%20%E2%80%9CSet-ADServerSettings%20-ViewEntireForest%20%24true%E2%80%9D.%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22x-hidden-focus%22%3EI%20found%20this%20article%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Fhelp%2F4295103%2Fpowershell-cmdlet-parameter-combinations-don-t-work-with-exchange-serv%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Fhelp%2F4295103%2Fpowershell-cmdlet-parameter-combinations-don-t-work-with-exchange-serv%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22x-hidden-focus%22%3EFor%20this%20issue%2C%20User%20is%20located%20in%20a%20different%20AD%20forest%20than%20my%20admin%20account%2C%20also%20I%20am%20running%20the%20command%20from%20a%20different%20Exchange%20server%20than%20the%20one%20user%20mailbox%20is%20in.%20I%20have%20full%20admin%20rights%20and%20all%20necessary%20admin%20roles%2C%20organizational%20management%2C..etc%20no%20issues.%20I%20usually%20use%26nbsp%3BSet-ADServerSettings%20-ViewEntireForest%20%24true%E2%80%9D%20to%20manage%20these%20user%20objects.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22x-hidden-focus%22%3EFor%20this%20issue%2C%20when%20i%20specify%20the%20AD%20server%20that%20user%20object%20resides%20with%20parameter%20%3CSTRONG%3E-DomainController%3C%2FSTRONG%3E%26nbsp%3B(Get-MailboxJunkEmailConfiguration%20-Identity%20%22user%40contoso.com%22%20-domaincontroller%20ADcorp.spain.contoso.com)%20it%20works%20well.%20But%20when%20I%20don't%2C%20I%20have%20this%20error%2C%20and%20what%20is%20weird%20is%20that%20I%20am%20getting%20this%20error%20only%20for%20this%20particular%20cmdlet%26nbsp%3B%20%22GetMailboxJunkEmailConfiguration%22%26nbsp%3B%20and%20perhaps%20others%20listed%20in%20above%20article.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22x-hidden-focus%22%3EIf%20I%20do%20any%20other%20command%2C%20e.g%20get-mailbox%2C%20get-calendarprocessing%20etc%2C%20I%20don't%20need%20to%20specify%20the%20-DomainController%20and%20it%20works%20fine%20without%20errors.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22x-hidden-focus%22%3EIt's%20very%20strange%2C%20I%20dont%20know%20if%20anyone%20else%20have%20faced%20this%20issue%2C%20why%20its%20only%20happening%20to%20certain%20cmdlets%20in%20Exchange%202013%2F2016%3F%20There%20doesn't%20seem%20to%20be%20much%20info%20about%20it%20apart%20from%20that%20article%20above%20saying%20to%20use%20the%20-domaincontroller%20as%20workaround.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1491887%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EEMS%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%202016%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1493813%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20cmdlet%2Fparameter%20combinations%20are%20unsuccessful%20in%20Exchange%20Server%202016%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1493813%22%20slang%3D%22en-US%22%3EHello%20Josh%20U%2C%3CBR%20%2F%3E%3CBR%20%2F%3EIt%20could%20be%20that%20you%20are%20looking%20for%20this%20piece%20of%20information%2C%20you%20will%20need%20to%20specify%20the%20-ReadFromDomainController%20instead%20of%20the%20normal%20-Domaincontroller%20parameter.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20ReadFromDomainController%20switch%20specifies%20that%20information%20should%20be%20read%20from%20a%20domain%20controller%20in%20the%20user's%20domain.%20If%20you%20run%20the%20command%20Set-AdServerSettings%20-ViewEntireForest%20%24true%20to%20include%20all%20objects%20in%20the%20forest%20and%20you%20don't%20use%20the%20ReadFromDomainController%20switch%2C%20it's%20possible%20that%20information%20will%20be%20read%20from%20a%20global%20catalog%20that%20has%20outdated%20information.%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello All, I notice this weird error from Exchange powershell while running this cmdlet:-

 

Get-MailboxJunkEmailConfiguration -Identity "user@contoso.com"

 

Error:-

Error on proxy command 'Get-MailboxJunkEmailConfiguration -Identity:'user@contoso.com'' to server Ex01.corp.contoso.com: Server version
15.01.1713.0000, Proxy method RPS:
The operation couldn't be performed because object 'Ex02.corp@contoso.com' couldn't be found on 'ADcorp.france.contoso.com'..
+ CategoryInfo : NotSpecified: (:) [Get-MailboxJunkEmailConfiguration], CmdletProxyException
+ FullyQualifiedErrorId : Microsoft.Exchange.Configuration.CmdletProxyException,Microsoft.Exchange.Management.StoreTasks.GetMailboxJunkEmailConfiguration

 

The following correctly applies to my Exchange environment:-

  • Microsoft Exchange Server 2016 environment that contains two or more mailbox servers.
  • Active Directory Forest contains two or more domains.
  • Exchange Servers and user objects are located in different Active Directory domains.
  • I manage recipients through Exchange Management Shell (EMS) by setting “Set-ADServerSettings -ViewEntireForest $true”.

 

I found this article - https://support.microsoft.com/en-us/help/4295103/powershell-cmdlet-parameter-combinations-don-t-work...

 

For this issue, User is located in a different AD forest than my admin account, also I am running the command from a different Exchange server than the one user mailbox is in. I have full admin rights and all necessary admin roles, organizational management,..etc no issues. I usually use Set-ADServerSettings -ViewEntireForest $true” to manage these user objects. 

 

For this issue, when i specify the AD server that user object resides with parameter -DomainController (Get-MailboxJunkEmailConfiguration -Identity "user@contoso.com" -domaincontroller ADcorp.spain.contoso.com) it works well. But when I don't, I have this error, and what is weird is that I am getting this error only for this particular cmdlet  "GetMailboxJunkEmailConfiguration"  and perhaps others listed in above article. 

 

If I do any other command, e.g get-mailbox, get-calendarprocessing etc, I don't need to specify the -DomainController and it works fine without errors.

 

It's very strange, I dont know if anyone else have faced this issue, why its only happening to certain cmdlets in Exchange 2013/2016? There doesn't seem to be much info about it apart from that article above saying to use the -domaincontroller as workaround. 

1 Reply
Hello Josh U,

It could be that you are looking for this piece of information, you will need to specify the -ReadFromDomainController instead of the normal -Domaincontroller parameter.

The ReadFromDomainController switch specifies that information should be read from a domain controller in the user's domain. If you run the command Set-AdServerSettings -ViewEntireForest $true to include all objects in the forest and you don't use the ReadFromDomainController switch, it's possible that information will be read from a global catalog that has outdated information.