You've turned $owner into a list (it was a scalar before, with only one user as its value). You need to process each owner individually. BTW, the last item in the list is missing a double quote in your code.
Try this:
$owners = "user1", "user2", "user3", "user4"
$group = "group1";
foreach ($owner in $owners){
try {
$ownerobject = Get-ADUser $owner -ErrorAction STOP
$groupobject = Get-ADGroup $group -ErrorAction STOP
}
catch {
Write-Host "Could not get user/group information from Active Directory";
break;
}
try {
$ldapstring = "LDAP://" + $groupobject.distinguishedname;
$ldapgroup = [ADSI]$ldapstring;
[System.DirectoryServices.DirectoryEntryConfiguration]$secoptions = $ldapgroup.get_Options();
$secoptions.SecurityMasks = [System.DirectoryServices.SecurityMasks]'Dacl';
$identityref = $ownerobject.sid.value;
$sid = New-Object System.Security.Principal.SecurityIdentifier ($identityref);
$adrights = [System.DirectoryServices.ActiveDirectoryRights]::WriteProperty;
$type = [System.Security.AccessControl.AccessControlType]::Allow;
$objectguid = [Guid]"bf9679c0-0de6-11d0-a285-00aa003049e2";
$adrule = New-Object System.DirectoryServices.ActiveDirectoryAccessRule ($sid, $adrights, $type, $objectguid);
$ldapgroup.get_ObjectSecurity().AddAccessRule($adrule);
$ldapgroup.CommitChanges();
Write-Host ("ACLs updated for group: " + $group);
}
catch {
Write-Host ("Could not set new ACLs on group: " + $group);
break;
}
}