Get Users Outlook Anywhere Status

Get Users Outlook Anywhere Status

After a migration from Exchange 2010 to on Premise Exchange 2016 we discovered that not all users were able to get mail as their Outlook Anywhere was not enabled.

So I knocked up this script to find, list and enable the users whos wasn’t.

[cc lang=”powershell”]

# Find Migrated users Outlookanywhere state.

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;

$ScriptPath = Split-Path $MyInvocation.InvocationName

$file = Read-Host “Please Enter data file name, just the name no ext or path”
$Users = Get-Content “$ScriptPath\mailbox migrations\source\$file.csv”

$mapi =@()
$nomapi = @()

ForEach ($user in $users){
$owa = Get-Mailbox -Identity “$user” | Get-CASMailbox
if($owa.OWAEnabled -eq “true”){
write-host “$user has OWA ENABLED” -ForegroundColor Green
}
else{
write-host “$user has OWA DISABLED, Setting now…” -ForegroundColor Red
Get-CASMailbox $user | Set-CASMailbox -OWAEnabled $true
}
}

[/cc]

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *