Quantcast
Channel: Exchange Server 2013 - Setup, Deployment, Updates, and Migration forum
Viewing all articles
Browse latest Browse all 7129

Script using Update-Recipient

$
0
0

Working on a Script that will be run as a scheduled task.  I have most of the script setup but running into one stopping point that's not working how I want it to.

The script runs a Get-Mailuser with some filters that is saved into a variable.

I then have a ForEach loop running through those users and setting them so that the EmailAddressPolicyEnabled is set to False. Then it does and Update-Recipient against that user to mail enable them.  Unfortunately some users still have something wrong with the account so that Update-Recipient fails.  But I haven't been able to detect that failure so that I can have my script do something else if that fails.  Any Ideas on how I can determine if Update-Recipient worked or not.


Jeff C


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>