Thursday, September 27, 2007

Testing Outlook Web Access from the PowerShell

As any of my readers know I check things on a daily basis, typically in the morning. As part of these checks I fire up Internet Explorer 7 and go to our Outlook Web Access page and log in.

Today I figured out how to do all of this from a PowerShell, which has already cut my daily monitoring duties down about 90%. This is a pretty simple oneliner that will test one OWA url. It does however require you to enter a password in a dialog box.

Test-OWAConnectivity -url https://mail.yourdomain.com/owa -mailboxcredentials:)Get-Credential domail\user)

After you run that it will ask you for the password of the user and report back success or failure.

1 comments:

Anonymous said...

I get the following:
Unexpected token ')' in expression or statement.
At line:1 char:75
+ Test-OWAConnectivity -url https://owa.casham.com/owa -mailbowcredentials:)G <<<< et-Credential domail\user)