I will mention how to create a User Mailbox Database with Powershell commands in Exchange Server 2019 in this essay. I will perform this action through the Exchange Management Shell,which is specially designed for Exchange Server.
I am viewing the Exchange Servers running in environment and their version information with the help of the following command. I have 2 Exchange Servers in my current environment.
Get-ExchangeServer | Sort Name | Format-Table Name, Serverrole, Edition, AdminDisplayVersion |
I am listing all User Mailbox Databases in my both Exchange Servers in my environment with the help of the following command.
Get-MailboxDatabase -Status | Sort Name | Format-Table Name, Server, Mounted |
I am getting the User Mailbox Database information of both Exchange Servers running in my environment separately with the help of the following commands.
Get-MailboxDatabase -Status | ? {$_.server -like "EXCHSRV01"} | Sort Name | Format-Table Name, Server, Mounted
Get-MailboxDatabase -Status | ? {$_.server -like "EXCHSRV02"} | Sort Name | Format-Table Name, Server, Mounted |
I am getting information of the Database and Log directory paths of both Exchange Servers running in my environment with the help of the following command.
Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath |
I am creating a folder named MBXSYSDB on the E:\ drive.
I am creating the User Mailbox Database that I named MBXSYSDB under E:\ directory on my Exchange Server with Host Name of EXCHSRV01 with the help of the following command.
New-MailboxDatabase -Server EXCHSRV01 -Name MBXSYSDB -EdbFilePath E:\MBXSYSDB\MBXSYSDB.edb -LogFolderPath E:\MBXSYSDB |
I am restarting the Information Store service with the help of the following command.
Get-Service | Where-Object { $_.DisplayName –ilike “Information Store *” } | Start-Service |
I am making the User Mailbox Database I created to Mounted state with the help of the following command.
Mount-Database -Identity "MBXSYSDB" -Confirm:$False |
I am listing all User Mailbox Databases in my both Exchange Servers running in my environment with the help of the following command. I can see that the Database I have just created is also in the list.
Get-MailboxDatabase -Status | Sort Name | Select Name, Status, ContentIndexState |
You learned how this process, which is done through the classic GUI (Graphical User Interface), can be done easily through Exchange Management Shell With this essay. My advice to you is to stay away from the GUI environment for your management actions ,especially for Exchange Server, as much as possible. Make the most of Powershell's blessings :)
I hope it benefits...
You may submit your any kind of opinion and suggestion and ask anything you wonder by using the below comment form.