Exports a list of Display names, Primary email address and any aliases and outputs them to a file on the C:\
Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}} | Export-CSV c:\exported-smtp-addresses.csv -NoTypeInformation
Showing posts with label Exchange. Show all posts
Showing posts with label Exchange. Show all posts
Saturday, 30 April 2016
Monday, 28 May 2012
Remove the Exchange 2010 default Mailbox store
The First database contains the SystemMailboxes which are the Arbitration mailbox(es).
We have to move these system mailboxes to another database before of remove the Default Database.
1. Find the Arbitration Mailbox using the Exchange MAnagement Shell (EMS):
Get-Mailbox | Where {$_.Name -like "Discovery*" } | ft Name
You might need to move the Federation Mailbox also...
Get-Mailbox -Arbitration | ft Name
2. Now create a new move request in order to move the system mailboxes to another mailbox database:
New-MoveRequest -Identity "SystemMailbox{yourGUID}" -TargetDatabase "dbxxxx"
New-MoveRequest -Identity "DiscoverySearchMailbox{yourGUID}" -TargetDatabase "dbxxxx"
New-MoveRequest -Identity "FederatedMail{yourGUID}" -TargetDatabase "dbxxxx"
3. Verify whether the move request completed:
Get-MoveRequest
4. Now remove the move request
Or clear the lot...Remove-MoveRequest -Identity "the name of the request like Microsoft Exchange Approval Assistant"
Edit: For Exchange 2016 you can use these commands:Get-MoveRequest | Remove-MoveRequest
Get-Mailbox -Arbitration | New-MoveRequest -TargetDatabase "dbxxxxxxx"
Get-Mailbox | Where {$_.Name -like "Discovery*" } | New-MoveRequest -TargetDatabase "dbxxxxxxx"
Get-Mailbox -Database "Mailbox Database Old" -AuditLog | New-MoveRequest -TargetDatabase "dbxxxxxxx"
Get-Mailbox -Database "Mailbox Database Old" | New-MoveRequest -TargetDatabase "dbxxxxxxx"
Labels:
Arbitration,
Discovery,
Exchange,
remove database
Subscribe to:
Posts (Atom)