Thursday, 19 March 2015

How to Create Mailboxes in Exchange Server 2010 from Cmdlet

In the Exchange Management Shell, you can create a user account with a mailbox by using the New-Mailbox cmdlet. 
Here's an example of the syntax and usage. 

Note: When you are prompted, enter a secure password for the new user account. 

Syntax
New-Mailbox -Name Name -Password Password
-UserPrincipalName UserNameAndSuffix
[-MailboxPlan <MailboxPlanIdParameter>] {AddtlParams} {ModParams}
New-Mailbox -Name Name -Password Password -WindowsLiveID WindowsLiveId
[-EvictLiveId {$true | $false}] [-MailboxPlan MailboxPlanId]
{AddtlParams} {ModParams}
New-Mailbox -Name Name -UserPrincipalName UserNameAndSuffix
[-MailboxPlan MailboxPlanId] {AddtlParams} {ModParams}
New-Mailbox -Name Name -UseExistingLiveId {$true | $false} -WindowsLiveIDWindowsLiveId
[-MailboxPlan MailboxPlanId] {AddtlParams} {ModParams}
New-Mailbox -Name Name -Shared {$true | $false} -UserPrincipalNameUserNameAndSuffix
[-Password Password] {AddtlParams} {ModParams}
New-Mailbox -Name Name -Room {$true | $false} -UserPrincipalNameUserNameAndSuffix
[-Password Password] {AddtlParams} {ModParams}
New-Mailbox -Name Name -Equipment {$true | $false} -UserPrincipalNameUserNameAndSuffix
[-Password Password] {AddtlParams} {ModParams}
New-Mailbox -Name Name -LinkedDomainController DCName
-LinkedMasterAccount Identity -UserPrincipalName UserNameAndSuffix
[-LinkedCredential Credential] [-Password Password]{AddtlParams} {ModParams}
New-Mailbox -Name Name -ImportLiveId {$true | $false}
-WindowsLiveIDWindowsLiveId {AddtlParams} {ModParams}
New-Mailbox -Name Name -Arbitration {$true | $false} -UserPrincipalNameUserNameAndSuffix
[-Password Password] {AddtlParams}
New-Mailbox -Name Name -FederatedIdentity FederatedId -WindowsLiveIDWindowsLiveId {AddtlParams}
{ModParams}
[-ArbitrationMailbox ModeratorMailbox] [-ModeratedBy Moderators][-ModerationEnabled <$true | $false>]
[-SendModerationNotifications<Never | Internal | Always>]
{AddtlParams}
[-ActiveSyncMailboxPolicy MailboxPolicyId] [-Alias ExchangeAlias] [-Archive {$true | $false}]
[-Database DatabaseId] [-DisplayName Name] [-DomainController FullyQualifiedName] [-FirstName FirstName]
[-Initials Initials] [-LastName LastName] [-ManagedFolderMailboxPolicy MailboxPolicyId]
[-ManagedFolderMailboxPolicyAllowed {$true | $false}] [-Organization OrgName] [-OrganizationalUnit OUName]
[-PrimarySmtpAddress SmtpAddress] [-QueryBaseDNRestrictionEnabled <$true | $false>]
[-RemoteAccountPolicy RemoteAccountPolicyId] [-ResetPasswordOnNextLogon <$true | $false>]
[-SamAccountName PreWin2000Name] [-SharingPolicy SharingPolicyId] [-ThrottlingPolicy ThrottlingPolicyId]

Usage
New-Mailbox -Name "Sachin Kumar" -Alias "sachink" -OrganizationalUnit "techpeoples.net/Exchange"
-Database "Exchange Support" -UserPrincipalName " sachink@techpeoples.net" -SamAccountName "sachink" -FirstName "Sachin"


-Initials "S" -LastName "Kumar" -ResetPasswordOnNextLogon $true -Archive $true

No comments:

Post a Comment