We help IT Professionals succeed at work.
Get Started

Exchange 2010 Powershell: Get-Mailbox "No provisioning handler installed"

Quantifiable asked
Last Modified: 2012-08-11
I have an elusive problem.  I am using a PowerShell script to modify the SMTP Addresses of over 90 users.  I don't want to do this manually (I hear carpal tunnel sucks).

Important information:
AD Domain Controller(s) Platform: Windows Server 2008 SP2 (2008 Native Domain)
Exchange Server 2010:  Windows Server 2008 SP2 (separate form DC -- serving all Exchange roles)
PowerShell:  V2.0 run from Windows7 64-bit workstation running ADRMT
Here is my script, and the resulting output:

Import-Module ActiveDirectory

if (-not (Get-PSSnapin | Where-Object {$_.Name -like "Microsoft.Exchange.Management.PowerShell.E2010"}))
    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

$pass = ConvertTo-SecureString 'xxxxxxx' -AsPlainText -Force
$Creds = new-object -typename System.Management.Automation.PSCredential -argumentlist "xxxxxx\Administrator",$pass

$results = Get-ADUser -Filter "*" -SearchBase "OU=Users,DC=mylocal,DC=lan"

foreach($result in $results){

$ident = "mylocal\" + $result.sAMAccountName

    <#$Mailboxes = get-mailbox -OrganizationalUnit "OU=users,DC=CCBBC,DC=LAN" -ResultSize Unlimited#>
    $Mailbox = get-mailbox -Credential $Creds -DomainController "mydc.mylocal.lan" -identity $ident

        $Mailbox.primarysmtpaddress = ($result.sAMAccountName + "@group.mylocal.edu")

    set-mailbox -Identity $result.sAMAccountName -Linkedcredential $Creds -PrimarySMTPAddress $Mailbox.primarysmtpaddress


Open in new window

However, when it gets to the "Set-Mailbox" command, I get the following output:
Set-Mailbox : No provisioning handler is installed.
At C:\ChangeEmail.ps1:25 char:16
+     set-mailbox <<<<  -Identity $result.sAMAccountName -Linkedcredential $Creds -PrimarySMTPAddress $Mailbox.primarysmtpaddress
    + CategoryInfo          : NotSpecified: (:) [Set-Mailbox], InvalidOperationException
    + FullyQualifiedErrorId : 771ED1AB,Microsoft.Exchange.Management.RecipientTasks.SetMailbox

Does anyone have any ideas?
Watch Question
Solutions Architect, Project Lead
Top Expert 2013
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE