Error "Couldn't find object" while updating Exchange DP group RRS feed

  • Question

  • Hi guys!

    I have a problem and here it is:

    I connect to Exchange Online via PowerShell to update distribution point group. My cmdlet looks like this:

    Update-DistributionGroupMember -Identity "power_shell_test" -Members $usersGroup -Confirm:$false  -Verbose

    All users in $usersGroup are brought from Active Directory. 

    The problem is that I get an error:

    Couldn't find object "". Please make sure that it wa
    s spelled correctly or specify a different object...

    As far as i understand, it`s caused because it can`t find user`s email.

    I want to ignore this error and run script forward. I tried to run it with "-ErrorAction SilentlyContinue" but it`s not working.

    Maybe I should use Try/Catch blocks? If yes, please give me an idea how to do it.


    • Moved by Bill_Stewart Monday, October 2, 2017 9:55 PM Abandoned
    Sunday, August 27, 2017 4:35 PM

All replies