Get-ExchangeServer | ?{$_.IsHubTransportServer -eq $true} | Get-Queue | get-message | ? {$_.sender -eq 'Vinc@somedomain.uhoh'} | Remove-Message -withNDR $false
Exchange
#Add Exchange snapin if not already loadedif (!(Get-PSSnapin | where {$_.Name -eq "Microsoft.Exchange.Management.PowerShell.E2010"})) { Write-Verbose "Loading the Exchange snapin" Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction SilentlyContinue . $env:ExchangeInstallPath\bin\RemoteExchange.ps1 Connect-ExchangeServer -auto -AllowClobber }script by Paul Cunnigham.
You have likely typed the recipients cached email address. Click the TO: button and select the intended recipient(s) from your address book (GAL)
EMC > ‘Organization Configuration’ > ‘Mailbox’ > ‘Offline Address Book’ Rt. click‘Update’
Export
New-MailboxExportRequest -Mailbox user_name -FilePath \\exdag01\c$\export\user_name.pstCheck Export Status
Get-MailboxExportRequest | Get-MailboxExportRequestStatisticsImport
New-MailboxImportRequest -FilePath \\exdag01\c$\export\user_name.pst -Mailbox user_nameCheck Import Status
Get-MailboxImportRequest | Get-MailboxImportRequestStatistics | select filepath, statusClear Completed Export Request
Get-MailboxExportRequest | where {$_.status -eq "Completed"} | Remove-MailboxExportRequestClear Completed Import Request
Get-MailboximportRequest | where {$_.status -eq "Completed"} | Remove-MailboxImportRequest
Search-Mailbox -Identity "username" -DeleteContent -force
Mail Flow Settings tab>Message Delivery Restrictions>Properties, uncheck “Require that all senders are authenticated”, and click OK
Code to format date as 01/01/2016 for use in naming log file
$today = (get-date).tostring("MM-dd-yyyy")Code to format date in the past
get-date).AddDays(-365).tostring("MM/dd/yyyy")
When running RedistributeActiveDatabases.ps1 if you receive the following error… restart powershell.
New-Object : Cannot find type [HADatabaseLoadBalancing.DatabaseMoveStatus]: make sure the assembly containing this type
is loaded.
At C:\Program Files\Microsoft\Exchange Server\V14\Scripts\RedistributeActiveDatabases.ps1:648 char:70
+ [HADatabaseLoadBalancing.DatabaseMoveStatus]$moveStatus = New-Object <<<< -TypeName "HADatabaseLoadBalancing.Dat
abaseMoveStatus"
+ CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
Get-Content C:\scripts\users-to-move.txt | New-MoveRequest -TargetDatabase archive01