#Powershell script to move #Exchange 2010 Databases back to Perference 1


So if you paying attention and saw in my previous post, you can check the database ActivationPreference. [#Powershell script to check #Exchange 2010 Database Perference]

Well this script goes one step further and actually moves a database back to ActivationPreference #1 it is not on it!

Again, it’s another one liner

get-MailboxDatabase | Sort Name | FOREACH {$db=$_.Name; $xNow=$_.Server.Name ;$dbown=$_.ActivationPreference| Where {$_.Value -eq 1};  Write-Host $db “on” $xNow “Should be on” $dbOwn.Key -NoNewLine; If ( $xNow -ne $dbOwn.Key){Write-host ” WRONG” -ForegroundColor Red; Move-ActiveMailboxDatabase $db -ActivateOnServer $dbOwn.Key -confirm:$False}ELSE{Write-Host ” OK” -Foregroundcolor Green}}


Leave a Reply

%d bloggers like this: