
Exchange 2019 PowerShell

Exchange 2019:- Change Deleted Item Retention with PowerShell
Quick tip: If you want to change your Deleted Item Retention on your mailbox database, you can do so running a simple command in PowerShell using the Exchange Management Shell: Set-MailboxDatabase -Identity "Mailbox Database Name" -DeletedItemRetention 30 If you...

Exchange 2016:- Get DB size with a simple command
In Exchange, mailbox moves and cleanup happen all the time, especially when you upgrading to newer versions etc. Now when you move mailboxes and you not using a 3rd party app like Odin that sits as an extra layer, you cannot see the store size from the web console. In...

Exchange 2010:- Check when user mailboxes were created using PowerShell
As an IT Admin or Exchange Admin, you might have come across the question "When were the mailboxes created". In this quick example, we will look at the script you can run to check all users in the Organization or just an individual mailbox. To check all users in...

Exchange 2019:- Running the Management Tools from a Non-Exchange Server
As an Exchange Admin, you might have help desk staff that need to run commands or do things on Exchange but you don't want them logging into the Exchange Servers directly for company policy prevents it. Each case is unique and each business has it's set of...

Exchange 2010:- Export Mailbox using a date range with PowerShell
Exporting mailboxes is great but what if you only wanted information for a certain period as you need it for whatever reason, legal, manager, etc. Well using the Exchange Management Shell (EMS) you can run the following command to export the data: $Users = Get-Content...

Exchange 2010/2013/2016:- Check Mailbox Database Copy status in various ways with PowerShell.
There are many ways in PowerShell to check the mailbox database copy status in Exchange, here are some examples from the Exchange Management Shell (EMS): Blanket check.Per DAG check.Per Server check. Get-MailboxDatabaseCopyStatus * The above command runs across all...

Exchange 2010 and above:- Bulk update move requests with PowerShell
With mailbox moves, you do get the few that fail and instead of updating each one with the -BadItemLimit switch you can do this one liner command to update them all before resuming them, here is the command: Get-MoveRequest | Set-MoveRequest -BadItemLimit 500...

Exchange 2019 – Connect a deleted mailbox or recover it
In this example, we are going to connect/recover a mailbox that we deleted in the previous blog post. As an example, we created a new test user as shown below to connect to a mailbox. To do this you can use PowerShell to create the user or use Active Directory Users...

Exchange 2019 – Delete a mailbox using PowerShell
In Exchange 2019, like other versions like 2016 or 2013, you can delete a mailbox using a single command. To firstly find the list of mailboxes you can run the following command: Get-Mailbox In this example we are going to remove the mailbox called "edward". To remove...

Exchange 2019 – Check the Services with PowerShell
In Exchange, I pretty much do everything with PowerShell. A quick tip if you want to make sure everything is running, service wise, you can do so in Powershell: Get-Service *MSExchange* Just by running a simple command you have a complete overview of what is not...