TechShizz | All posts tagged 'Exchange 2010'

Merging mailboxes

To merge a mailbox with another we can Export then Import pst files and then change it's address to follow the source account.


Steps to Follow:

Export the X500 Addresses of the address that receives the email

Change the SMTP address on the source account to something else

Change the SMTP address on the target account to the new address

Export the pst

Delete the old account

Import the pst

Make the SMTP on the new account primary.

Get permissions for all mailboxes

$OutFile = "C:\Temp\PermissionExport.txt"

"DisplayName" + "^" + "Alias" + "^" + "Full Access" + "^" + "Send As" | Out-File $OutFile -Force

$Mailboxes = Get-Mailbox -RecipientTypeDetails usermailbox -ResultSize:Unlimited | Select Identity, Alias, DisplayName, DistinguishedName

ForEach ($Mailbox in $Mailboxes) {

$SendAs = Get-ADPermission $Mailbox.DistinguishedName | ? {$_.ExtendedRights -like "Send-As" -and $_.User -notlike "NT AUTHORITY\SELF" -and !$_.IsInherited} | % {$_.User}

$FullAccess = Get-MailboxPermission $Mailbox.Identity | ? {$_.AccessRights -eq "FullAccess" -and !$_.IsInherited} | % {$_.User}

$Mailbox.DisplayName + "^" + $Mailbox.Alias + "^" + $FullAccess + "^" + $SendAs | Out-File $OutFile -Append


Configure Logging in Exchange 2010

The main place to configure logging is when right clicking on the  server object under server configuration for a giver server.

Click on "Manage Diagnostic Logging Properties" and configure which logs are needed.

Manage Diagnostic Logging Properties


Logging can also be enabled for a given connector as shown below.

Send connector properties


On the Hub Transport role, we can configure if logging happens and where to save those log files.

Log settings tab


It's also worth noting that Group Policy may have some audit policies enabled that will pick up some Exchange events.

Local Audit Policy

Exchange mailbox repair (scan check)

New-MailboxRepairRequest -Mailbox jon.jones -CorruptionType SearchFolder,AggregateCounts,ProvisionedFolder,FolderView

then to view the status of the repair: (exchange 2013+ only, otherwise you need to check the application event log for the completion status. In my experience it completes < 10 minutes)

Get-MailboxRepairRequest -Mailbox big.dave | FL