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