Created
November 14, 2017 22:15
-
-
Save notesbytom/fdf7a57711ab5cd27b9ac017496d5f58 to your computer and use it in GitHub Desktop.
Clear Old Public Folder Database Settings on Mailbox Databases in Exchange 2013+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import-module activedirectory | |
# Substitute correct values in place of * and com below. | |
cd "AD:\CN=Databases,CN=Exchange Administrative Group (*),CN=Administrative Groups,CN=*,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=*,DC=com" | |
get-item * -Properties msExchHomePublicMDB | ` | |
foreach { | |
# Show name of mailbox database | |
$_.Name; | |
if ($_.msExchHomePublicMDB -eq $null) { | |
"NULL PF DB" | |
} else { | |
# Show name of public folder database (legacy) | |
$_.msExchHomePublicMDB; | |
# Clear the legacy public folder database setting on mailbox db | |
set-adobject $_ -Clear "msExchHomePublicMDB" -verbose | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment