Cannot create exchange 2013 linked mailbox user with powershell, but works with GUI

Hi everyone.
I ran into an odd problem in our Exchange 2013 DAG hosting setup. A brief description of is we´re running it as account/resource topology, two Exchange 2013 servers in DAG, two Exchange 2013 domain controllers. (Forest level 2012 R2)

Until yesterday we had, no problems creating customers (forest account users, OU´s, Exchange databases and linked mailboxes). Suddenly I ran into a problem creating the Linked mailbox part, using our PowerShell scripts. (They have worked until now, with no problems)

Well, here´s the deal.
I´m trying to create a new hosting customer (xxx.dk) - creating OU´s in account domain - and creating Exchange 2013 - customer database, E-mail address policy, OAB and ABP. All is fine, until I´m trying to create new Exchange Linked mailboxes for the users in the Account domain with PowerShell.

Getting this error:
” Exception calling "SetInfo" with "0" argument(s): "A device attached to the system is not functioning”

The customer name exceeds 15 characters in the name (18 to be exact) – and my theory is that the number of characters in the customer name is the real problem, not the PowerShell script – or connection to the account domain/forest.

The funny part is, that I can create linked mailboxes from the GUI – without any problems on that same customer ??? What the F***

What is going on here in Exchange 2013 PowerShell?

I can still create new customers with names (i.e mail-hosting.dk) – with 15 characters without any problem at all. No errors using our present Exchange PowerShell scripts. So I guess any scripting error out of the loop. Or?

Is my theory, regarding the number of characters in the Customer name crazy – or is there a limitation in Exchange 2013 PowerShell, when connection to the Account forest ?

Alternatively, is it a limitation in server 2012 R2?
Sorry about the long description.

Please help

Best regards
Peter
Peter NørredalSenior IT ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peter NørredalSenior IT ConsultantAuthor Commented:
Hi Again
When testing further, I realized that the error Begins when I try to create customers with 17 characters or more, regardless of combination (I.E: Exchange-mails.dk Status= Fail (17 characters), Cykelbanditten.dk status=fail (17 characters, but without a dash (-))

Is there by any chance a buffer size limit in Exchange powershell ?
so it cannot hold more than 16 characters - I´m confused to the MAX

Thanks
0
Peter NørredalSenior IT ConsultantAuthor Commented:
I think I figured out what the problem is.

The SAM-Account-Name (User Logon Name (pre-windows 2000) when creating a new Linked Mailbox user cannot exceed 20 characters - so I have to format the output of this before creating the AD user object in account forest.

Some times I really HATE that backwards compatibility Microsoft insist of keeping in Active Directory.

Thanks
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.