New Mailbox Database using PowerShell
In this post I will create a new Mailbox Database for Exchange 2016 using PowerShell.
Available Syntax for the cmdlet “New-MailboxDatabase”
1 2 3 4 5 6 7 |
New-MailboxDatabase -Name -Server [-AutoDagExcludeFromMonitoring <$true | $false>] [-IsExcludedFromInitialProvisioning ] [-IsExcludedFromProvisioning <$true | $false>] [-IsSuspendedFromProvisioning <$true | $false>] [-OfflineAddressBook ] [-PublicFolderDatabase ] [-Confirm []] [-DomainController ] [-EdbFilePath ] [-LogFolderPath ] [-MailboxProvisioningAttributes ] [-SkipDatabaseLogFolderCreation ] [-WhatIf []] [] |
To get started we need to launch the Exchange PowerShell console and the run the following cmdlet.
1 |
New-MailboxDatabase -Name "DB1" -Server ThatLazyEX-02 -EdbFilePath D:\DB\DB1.edb -LogFolderPath D:\Logs\ |
Next is to mount the newly created DB.
1 |
Mount-Database DB1 |
Lets verify that DB and Logs is created in the correct location before we start creating new Mailboxes on this DB.
1 |
Get-MailboxDatabase Db1 |ft Name,EdbFilePath ,LogFolderPath -AutoSize |
Lets go a head and create a mailbox and select the newly created DB.
1 |
Enable-Mailbox -Identity User2 -Database DB1 |
#ThatLazyAdmin
Awesome. Practical365 is telling how to move your stuff to a new database. But, how do you create the new database? Right HERE! Thank you