Set user description and job title during new mailbox creation

I am trying to create multiple linked mailboxes on Exchange 2013 using PowerShell and a .csv file. I have a column for each parameter I need in the .csv file. The mailbox creation works fine with all parameters until I introduce "description" and "title". For some reason powershell does not recognize these parameters and the script fails. Here is the script I am using.

Import-Csv "C:\LinkedMailboxTest.csv" | foreach { New-Mailbox -Name $_.displayName -alias $_.Alias -FirstName $_.FirstName -Lastname $_.LastName -sAMAccountName $_.sAMAccountName -UserPrincipalName $_.UserPrincipalName -description $_.description -title $_.title -Organizationalunit $_.OrganizationalUnit -LinkedMasterAccount $_.LinkedMasterAccount -LinkedDomainController $_.LinkedDomainController -Database $_.Database } 

This is the error message I am getting: "A parameter cannot be found that matches parameter name 'description'. Does anyone know what I am doing wrong?

1 Answer

Description and Title are not Exchange attributes, they are Active Directory attributes. You will need to invoke a separate command Set-user to perform this. Note in the linked materials that Title and Description are not available to set in the verb-Mailbox cmdlets.

Set-Mailbox
Set-User

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like