Success message Outlook Anywhere

Hello everyone,

I have builded a script for activation of Oulook Anywhere on the Exchangeserver. 

. 'D:\Programs\Microsoft\Exchange Server\bin\RemoteExchange.ps1' 
Connect-ExchangeServer -auto; 
Get-Content .\OutlookAnywhere.txt|foreach { Get-mailbox identity $_ | set-casmailbox mapiblockoutlookrpchttp:$false }
Read-Host "Press enter to exit..."
exit

The script is working but It doesn't show if the activation has been succeeded or not for each user. Is there a commandline for showing a success-message and, when yes, how can build in my script?

Thank you for your help and time.




  • Edited by HSG1984 19 hours 15 minutes ago
April 22nd, 2015 7:27am

If it fails you will get an error.

Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2015 9:03am

The script is working perfectly but it doesn't snow a message for each user that is has been succeeded.

For example..

user1... succes

user2... succes

user3... succes

user4... succes

April 22nd, 2015 9:09am

Just add a message.

Start here: https://www.google.com/?gws_rd=ssl#newwindow=1&q=powershell+output+message

Don't be afraid to use the Internet to search for simple answers.

Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2015 9:22am

Already did but how I don't know how I can put that in my script.
April 22nd, 2015 9:26am

What did you try?

Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2015 9:36am

Already did but how I don't know how I can put that in my script.

Put your set command and a success message line in a try block. If the set command fails, use the catch block to write an error.

April 22nd, 2015 9:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics