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

Posted on 2014-08-02
Last Modified: 2014-08-03
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 ( - 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 – 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
Question by:Peter Nørredal

    Author Comment

    by:Peter Nørredal
    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: Status= Fail (17 characters), 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


    Accepted Solution

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Find out how to use dynamic social media in email signatures with this top 10 DOs & DON’Ts.
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
    In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now