21 November 2016

Un-hide users from GAL

Exchange 2007
I am in the middle of running an Office 365 migration and during this migration, it's required that I un-hide the users from the GAL (disabled users) in order for O365 to recognise them and migrate them.

My client wants the disabled user's mailbox migrated and then converted to a Shared Mailbox in order to maintain an archive of the mail.  In order to do this, we need a list of all the mailboxes that are hidden, then we can hide them.  Once we're done we can use that same list to hide them again.

Generate CSV for all mailboxes hidden from the GAL

Get-Mailbox | Where {$_.HiddenFromAddressListsEnabled -eq $True} | Select Identity, HiddenFromAddressListsEnabled | export-csv c:\HiddenFromGAL.csv

Set $Users parameter

$users = import-csv C:\HiddenFromGAL.csv

Un-hide the hidden users

Foreach($_ in $users) {Set-mailbox $_.identity -HiddenFromAddressListsEnabled $false}

This will then allow you to perform the migration (in this case I am doing a Staged migration) without O365 failing to find the user accounts.  Once you're done, simply repeat the last two stages. The final stage, change $False to $True.

Contact Winthrop Australia to find out how we can provide you with IT Support in Perth.

1 comment: