Cannot set PrimarySmtpAddress in New-Mailbox
I am attempting to add a new user with Powershell and am receiving the error New-Mailbox : A parameter cannot be found that matches parameter name 'PrimarySmtpAddress'. within the cmdlet I am at Version: 08.02.0176.002 on my workstation (Windows 7, 64 bit) I am at Version: 08.02.0254.000 on my server (Roll up 4) (Windows 2008 R2, 64 bit) Not sure what the difference is as far as 0176 - 0254 if ($global:emailFlg -eq "True") { New-Mailbox –UserPrincipalName $global:userPrincipalNameL ` -alias $global:aliasL ` -PrimarySmtpAddress $global:aliasL + "@" + $global:objBU.businessSMTPX ` –database $global:mailboxName ` –name $global:nameL ` –organizationalUnit $global:objBU.businessUnitDNX ` –password $global:secure_string_pwd ` -samAccountName $global:aliasL ` –FirstName $global:firstNameL ` -initials $global:mInitialL ` –LastName $global:lastNameL ` –DisplayName $global:displayNameL ` –ResetPasswordOnNextLogon $true TIA Paul
January 5th, 2011 12:56pm

You cant use -primarysmtpaddress with new-mailbox You can use it with enable-mailboxMCITP Enterprise Messaging Administrator, MCITP Enterprise Administrator, MCSE, MCDBA
Free Windows Admin Tool Kit Click here and download it now
January 5th, 2011 1:44pm

Ok. Is Microsoft's website wrong for its documentation for new-mailbox? See the bolded info below. http://technet.microsoft.com/en-us/library/aa997663.aspx New-Mailbox -Name <String> -Password <SecureString> -UserPrincipalName <String> [-ActiveSyncMailboxPolicy <MailboxPolicyIdParameter>] [-Alias <String>] [-ArbitrationMailbox <MailboxIdParameter>] [-Archive <SwitchParameter>] [-ArchiveDatabase <DatabaseIdParameter>] [-Confirm [<SwitchParameter>]] [-Database <DatabaseIdParameter>] [-DisplayName <String>] [-DomainController <Fqdn>] [-ExternalDirectoryObjectId <String>] [-FirstName <String>] [-Force <SwitchParameter>] [-ImmutableId <String>] [-Initials <String>] [-LastName <String>] [-MailboxPlan <MailboxPlanIdParameter>] [-ManagedFolderMailboxPolicy <MailboxPolicyIdParameter>] [-ManagedFolderMailboxPolicyAllowed <SwitchParameter>] [-ModeratedBy <MultiValuedProperty>] [-ModerationEnabled <$true | $false>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-OverrideRecipientQuotas <SwitchParameter>] [-PartnerObjectId <Guid>] [-PrimarySmtpAddress <SmtpAddress>] [-QueryBaseDNRestrictionEnabled <$true | $false>] [-RemoteAccountPolicy <RemoteAccountPolicyIdParameter>] [-RemotePowerShellEnabled <$true | $false>] [-ResetPasswordOnNextLogon <$true | $false>] [-RetentionPolicy <MailboxPolicyIdParameter>] [-RoleAssignmentPolicy <MailboxPolicyIdParameter>] [-SamAccountName <String>] [-SendModerationNotifications <Never | Internal | Always>] [-SharingPolicy <SharingPolicyIdParameter>] [-SKUAssigned <$true | $false>] [-SKUCapability <None | BPOS_S_Deskless | BPOS_S_Standard | BPOS_S_Archive | BPOS_L_Standard | BPOS_B_Standard | TOU_Signed | FederatedUser | Partner_Managed | MasteredOnPremise | ResourceMailbox | ExcludedFromBackSync | UMFeatureRestricted>] [-ThrottlingPolicy <ThrottlingPolicyIdParameter>] [-UsageLocation <CountryInfo>] [-WhatIf [<SwitchParameter>]] I did a get-help new-mailbox and -primarySmtpAddress is not offered as an option. Really confusing. Thx Paul
January 5th, 2011 2:20pm

There is a PrimarySmtpAddress parameter for the New-Mailbox cmdlet on Exchange 2010, but not on 2007. Here is the cmdlet help for New-Mailbox on Exchange 2007: http://technet.microsoft.com/en-us/library/aa997663(EXCHG.80).aspxMike Pfeiffer | blog: mikepfeiffer.net | twitter: @mike_pfeiffer
Free Windows Admin Tool Kit Click here and download it now
January 5th, 2011 2:46pm

Thx, I just realized that. Can't believe I got bit by this. Paul
January 5th, 2011 2:57pm

On Wed, 5 Jan 2011 17:51:36 +0000, pbbergs wrote: > > >I am attempting to add a new user with Powershell and am receiving the error > >New-Mailbox : A parameter cannot be found that matches parameter name 'PrimarySmtpAddress'. within the cmdlet That's because there isn't such a parameter. Use set-mailbox instead, after you create the new user and mailbox. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
January 5th, 2011 10:26pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics