Scenario: You wish to see how many remote mailboxes have the correct email domain configured for their remote routing address (TargetAddress). You want to perform a AD PowerShell query for speed. Scriptlet: Get-ADuser -filter {TargetAddress -like “*.mail.onmicrosoft.com”} | Select Name, TargetAddress OR you just want a count: (Get-ADuser -filter {TargetAddress -like “*.mail.onmicrosoft.com”} | Select Name, […]
Scenario: You want to use Get-ADUser to find all Exchange mailboxes in your environment. Scriptlet: Running the following will provide you with the detail: #First, lets store some results into $1 for every mailbox $1 = Get-ADUser -filter {HomeMDB -ne ‘$null’} -Properties MailNickName, HomeMDB, DisplayName| Select MailNickName, HomeMDB, DisplayName #Now its time to play with […]
Scenario: You are going to install the latest CU for Exchange, but you want to check the AD Schema levels to see if they need to be upgraded before the CU install Command Line: Using CMD line, run the following: (Everything in bold needs to be edited to reflect your Exchange organization OR your domain) […]
Create distribution list with no members. Emails sent to this DL will go into blackhole and won’t NDR. Exchange silently deletes them.
Scenario: Import pst into a mailbox Note: Must have mailbox export/import permissions to be able to do this. targetrootfolder is good if you are importing multiple psts into the mailbox. This way content is not merged under existing folders. From Powershell, type: New-MailboxImportRequest -Mailbox newmbox -filepath \serverpstfilesnewmbox.pst-BadItemLimit 50 -T argetRootFolder “Mailbox -newmbox”
Scenario: When you are trying to remove an Exchange Database, you receive the following error below. This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, public folder mailboxes or arbitration mailboxes. To get a list of all mailboxes in this database, run the command Get-Mailbox -Database <Database ID>. To get a list […]
Scenario: When you attempt to run Get-MailboxDatabase -includePreExchange2013, you get the following error: The Exchange server for the database object ‘DB11’ wasn’t found in Active directory Domain Services. The object may be corrupted. You then discovered the mailbox server that used to host the database no longer exists in your organization and was forcibly removed via ADSIEdit. […]
Scenario: When offboarding a mailbox, you receive the following error: “You cannot migrate mailbox off of Office365 while the mailbox has a connected account enabled.” Solution: You will have to remove the subscription before offboarding the mailbox. First, check the subscription to make sure its not anything that’s going to affect the user: get-subscription –mailbox […]