HCW Error when configuring the mail flow

Teka Teka
Occasional Contributor

Hi All,

im trying to run the HCW and i have the below error when it reach the mail flow configuration.


HCW0000 PowerShell failed to invoke 'New-InboundConnector': Parameter count mismatch. An unexpected error has occurred and a Watson dump is being generated: Parameter count mismatch



84 Replies

Interesting enough I had this same error yesterday too.  I am configuring the HCW in an Exchange 2013 CU15 environment with (2) CAS servers and (2) MBX servers.  I put a call into Office 365 support and after troubleshooting, they are having to escalate the issue.  Once I learn more I will post here in this community.  

Thanks Kevin,

also i have Exchange 2013 CU 15, i also open a case with MS support but im waiting for their call.

Same Problem. Would you please send a solution if you got?

Exchange 2016 CU5

I just had a call with MS support and they confirmed it's a known issue for them and the back end team are working to fix it.
Did MS Support indicate an ETA? This is holding up our migration for the entire organization.

Will Do!

We have the same issue here. We're supposed to start migrating 700 users...


Does anyone have news from MS?



We are experiencing the same issue. Our work is at a standstill. In the midst of configuring our hybrid configuration.

@Teka Teka wrote:

Hi All,

im trying to run the HCW and i have the below error when it reach the mail flow configuration.


HCW0000 PowerShell failed to invoke 'New-InboundConnector': Parameter count mismatch. An unexpected error has occurred and a Watson dump is being generated: Parameter count mismatch




Same issue here. E2016 CU4, trying to run the HCW to add a new domain. I'll be opening up a ticket as well.

I also work with Kevin Eyer and wanted to provide an update:


We are being told that since we already manually added a connector to our Tenant to allow mail flow from Office 365 cloud only mailboxes to our mailboxes on-premise which is required to continue mail flow from O365 Tenant users to our on premise users when we added our domain, that is causing the error.


Upon further reveiw of the logs by MS, they show that the root cause of the issue is that there is already an existing trust relationship with your onPrem environment. This can be seen in the log, if you look for this error: " PowerShell failed to invoke 'Set-FederatedOrganizationIdentifier': A trust relationship has already been defined for this organization." in additon to the original error posted by the OP.


In a nutshell, they are claiming that the connector we created a few days ago (which was required because as soon as we added our domain to an already established Tenant {due to a merger} it broke mail flow from O365 to our user on-premise and a connector had to be created to establish mail flow again) is causing the error even though I didn't realize adding a connector creates a Federation Trust? ..... Insert sarcasm. However, in the end the fix they are claiming is to remove our connector, wait 24 hours for it to "purge" the connector from the Tenant then rerun the HCW. Of course this will break mail flow from O365 to our on-premise during this time.  We did remove the connector from our Tenant and reran the HCW but still errored. They are claiming it may take up to 24 hours to remove and do not support to manually purge the connector via PS commands...sigh


Curious to hear others response on if you are setting up Hybrid to a brand new Tenant with no domains or is your Tenant already established and you have added the domain to the Tenant along with the connector required then runnign the HCW.


This is definitely holding up our migration and discussing internally on the next steps or using a 3rd party tool.

I opened a case. I'm told it is an ongoing known issue and to wait 48 - 72 hours.

I'm expecting a call back sometime today though.

Exchange 2013 CU15. Trying to validate connectors on a new tennant, with multiple subdomains and getting the same error.

Checked Service Health and didn't see anything yet.

Existing tenant here - the hybrid has been setup for a few weeks. Was adding a new email domain and using the HCW to add the trust and update the connector.
Same error here. Single domain, brand new tenant, brand new Exchange 2016 server.

Same error here. Existing 2+ year hybrid environment (2013 CU 16) that's been running fine. Re-ran the Hybrid Configuration Wizard today to replace an expiring certificate and hit this error.  It has now fouled up our connectors and we are down.  Support is so far clueless.

Same error here. I have not re-run the HCW but have been trying to modify a connector since yesterday mid-day with no success.

Yeah, I confirmed you can't create or edit any kind of inbound connector whether it's via the GUI or via PowerShell.  You always get the "Parameter Count Mismatch" error no matter what you do.  Microsoft support deleted my existing inbound connector while troubleshooting so I can't modify my outbound connector either since it does a check to make sure you have an inbound connector before saving.   I'm stuck with no mail flow until they fix this.

HI Guys, Who ever need a work around follow the process below. Create a partner inbound connector and set the cert TLS authentication to your hybrid server certificate subject name or your hybrid transport server certificate subject name. Create a transport rule and select sender ip addresses belong to one of these ranges, add all your onprem hybrid server public IP address. Then.. Do the following... Set the spam confidence level (SCL) to '-1' and set message header 'X-MS-Exchange-Organization-BypassClutter' with the value 'true' Rule mode Enforce Hopefully this will guys.
Dear Vimal, You are absolutely write , but your solution requires either a existing hybrid setup to look at command , or please be a bit more elaborative on command that need to run on cloud and command be run on tenant, Thanks and regards, Hasan Reza

HI Guys,


Trying to work this issue arround came accross a senario. I created a new org admin account, did not assign any permission. Then try to run the Hybrid Wizard, It worked. While i try the old admin account same error. Test it guys maybe it will work for you.

I am also having the same problem using the Office 365 Exchange admin center.


When I try an turn on an existing connector which is currently off I get the error


Parameter count mismatch.



John Ellwood 

Just to confirm creating a new org admin accounts work for 2 of my clients

For Me it is not change ,

Surprizingly even if you do direct connection to Office 365 portal via ps and give the command get-hybriddatacenterips , it gives the same Dump error,

I am not sure how changing admin account resolve this issue , unless there is cache thing being cleared,



Hasan Reza

I can create inbound connectors, just not set type to OnPremises. That's what throwing the exception.
No luck on the new account for me. When you say org account, you mean in the on-premises server, right? Or did you use a new account in Exchange Online?

I'm certain it is something on their end. The error is:

A variable that cannot be referenced in restricted language mode or a Data section is being referenced. Variables that can be referenced include the following: $PSCulture, $PSUICulture, $true, $false, and $null
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : VariableReferenceNotSupportedInDataSection
+ PSComputerName : outlook.office365.com

Since it is a remote session, I don't think we have any control over this.

We plan on removing the connector via PS instead of the ECP late on a Friday night. Let it "marinate" thru the night to allow for that connector to "purge" from theTenant. Then re-run the HCW on Saturday morning with fingers crossed that it had enough time to delete.  I asked and was told if it still errors at that time, that it is ok to continue to try to run the HCW until success every couple of hours. In other words, not harm or ill effect to continue to try setup the HCW. Not exaclty the best way or definitely a flaw on this whole process IMO as obviously others are experiencing the same issues even with different type of HCW deployments. Very frustrating to say the least and of course does not instill confidence with our leadership with the problems we have experienced just trying to lay the tracks in preparation for a migration.


This will push back our migration at least another week now.


I'll update with our progress.

Removing the connector and readding it will not work. I have been trying to setup a connector net new, with no existing configuration in place. I have even tried manually rebuilding the connector to no avail. Ultimately, it appears this is server error. My assumption is that the scope is fairly small, considering there is not more outcry currently. As far as confidence goes, I have done 50-60 migrations now and would still recommend Office 365 again and again. Things happen and when you are maintaining such a large infrastructure, and an issue impacts a small subset of users in an unpredictable way, it can be hard to catch. I've certainly seen uptimes incomparable to Exchange OnPrem. We just need to bring attention to the issue and it will get resolved.

I was finally able to re-run the HCW sucessfuly.  HOWEVER - since we were an existing install, here's my tale of woe: the wizard rebuilds the connectors which rebuilt the queues. Normally this probably is no big deal for a new install or when the wizard runs to completion in a few seconds.  Unfortunaltly, since we had been down for almost a day, this had the lovely effect of wiping out all the email that had been pending for my enterprise for the last 24 hours.  Microsoft's helpful response - "oops".  And of course their official position is that "you can't lose mail with our system so we don't do backups".  We are exploring what we can do.  If you are a production environment - be warned.

Creating new Admin Account in Office 365 and re-run Hybrid config wizard worked. 

Create office 365 organization admin and then use that new account for HWC
Doesn't work.

Just got off the phone with Microsoft Support.  They informed me that they are aware of the problem and stated that a "small amount" of customers have reported this problem and do not have an ETA for the resolution.  

Adding to this, today I was attempting to setup SMTP relay with on-premises organization to Office 365. and experienced the exact same error seen with the HCW when setting up the connector within Office 365.  Only this time I was simply setting up a SMTP relay connector.


 As we all know, the process of setting up SMTP relay with Office 365 tenant is a VERY easy process, and to make things even easier, this article walks you through the steps to a tee (How to set up a multifunction device or application to send email using Office 365 - https://support.office.com/en-us/article/How-to-set-up-a-multifunction-device-or-application-to-send...).


So the problem is not only affecting Hybrid Deployments/Environments.  It is affecting tenants who attempt to setup/configure connectors in the EAC.  My tenante today is currently NOT in a hybrid configuration.  Simply, the problem is within the Office 365 EAC > Mail Flow > Connectors.  Whether you are performing a new-inboundconnector command VIA the HCW, or simply trying to setup a SMTP relay connector, you will receive the following "generic" error:

Parameter count mismatch.


Mr. Schoenfld, unfortantely that does not work either.

Vimal - can clarify more please. When you say "I created a new org admin account, did not assign any permissions" do you mean you created a new account in your local AD and then added it to the Exchange Org admin Security group within AD then run the HCW? If so, what do you mean that you did not assign any permissions?


Please kindly elaborate-


I am willing to try this method at this point with a little more background on the requirements.



I'm not sure what you mean, I didn't imply anything worked.
Hi Ron, I created an office 365 only account with a UPN of tenant.onmicrosoft.com as the username. add user role as org admin. In the HCW wizard use the new account to signing to office365.


Same Error after new User and select Full Hybridconfiguration.


Same error here

Accounting software sends out invoices and needs a connector to use office 365 or office 365 refuses inbound email from the software.

Company switched ISP and has a new IP address, editing the existing connector resulted in Parameter Count Mismatch event, removing the connector and recreating it with the new IP has the same result.




Just had a chance to do this, no luck.  I received a different error this time, but it was on the same set-inboundconnctor command.


WinRM cannot complete the operation.  Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer.


Still waiting for my call back from MS after getting it transferred to another group.    



Exactly the same issue here.... I have spoken to MS support and all they said is they are aware and working on a fix, there is no time frame as yet!

This shocking!

3rd day is gone. yes thats shocking. you are right!


I opened a ticket last night, and received this:


Title: Mail connector issue

User Impact: Administrators may be unable to create or modify mail connectors.

Current status: We've initiated the deployment of the fix and we'll continue to monitor service health throughout the deployment process.

Scope of impact: Your organization is affected by this event.

Start time: Monday, May 15, 2017, at 8:02 PM UTC

Preliminary root cause: A recent update to the environment, intended to resolve a previously existing code defect, caused the mail connector service to become degraded.

Next update by: Friday, May 19, 2017, at 12:00 AM UTC

Last Updated: May 18 2017 4:53PM UTC   

Good to know it's at least showing up on someone's dashboard! Went to go look at mine and nothing about this. It's read-only Friday, so I won't be testing anything out today! :D

This seems to be quite and issue... and isnt half dragging on.


I have lost the ability to set up a conector to inpremis.


When setting it up im getting :


Error - Parameter Count Mismatch


Do we know how to update is being deployed, is it going to O365 or through Updates?

Looking at the incident Ryan posted, it sounds like it's a backend issue, so there should be nothing for us to update.
I am experiencing the same problem when trying to create the inbound connector using OnPremises option.

Just got a call from support stating they are working on the issue and have fixed it for about 50% of the users, he told me i could expect a fix during today or by Monday

oh well, its not like e-mail is relevant for a business /Set-SarcasmMode off


Great :/


Strange thing is my recieve is working fine so mail is now following in (Which it wasnt) but the send is goosed.. rather royally annoying!!