This came up in August 2013 as part of fighting an issue with inbound email.
var rec = new GlideRecord('sys_user'); rec.addQuery('active',true); rec.addQuery('locked_out',true); rec.query(); var counter=0; while (rec.next()){ counter++; rec.locked_out = false; rec.update(); } gs.print("counter is: " + counter);