search all users without result limit and change a property of found users:
var filterName = "*";
var paging = utils.createPaging(-1, 0);
var sortBy = "userName";
var scriptUsers = groups.searchUsers(filterName, paging, sortBy);
logger.log("found:" + scriptUsers.length);
var j = 0;
//change a property of the user:
for each(var scriptUser in scriptUsers) {
var p = scriptUser.person;
if (p.properties["userStatus"] != "") {
p.properties["userStatus"] = "";
p.save();
j = j+1;
}
}
logger.log("### changed for users:" + j);