Hi,
i'm doing a script to get security group user to update distribution group member,
when i execute the command with manual value, it works and update tehe
but when i execute from script it doesn't work.
this is the command: update-distributiongroupmember -identity "$DL" -Confirm:$false -BypassSecurityGroupManagerCheck -Members $listaemail
here the error, where the couldn't find object is the value of my $listaemail
Write-ErrorMessage : Ex94914C|Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|Couldn't find object
"albert*******,samuele*********,marco*********,giacom********,matteo****". Please make sure that it was spelled correctly or specify a different object.
At C:\Users\admi*******\AppData\Local\Temp\8\tmpEXO_4gcss23m.kg0\tmpEXO_4gcss23m.kg0.psm1:1092 char:13
+ Write-ErrorMessage $ErrorObject
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Update-DistributionGroupMember], ManagementObjectNotFoundException
+ FullyQualifiedErrorId : [Server=DU0PR08MB7738,RequestId=1439f618-8f46-0d80-887c-bcbbbaae1b76,TimeStamp=Fri, 16 Dec 2022 16:18:54 GMT],Write-ErrorMessage
i hide email address, but it will compare with "name.surname@keyman .ext,name.surname@keyman .ext" ecc..
someone can explain this issue?
thanks