I love Search...

I just had to clear the logonscript value for several OUs of users...

Code:

break on

$OU = 'LDAP://domain/OU=Users, OU=aXX, DC=domain,DC=com'

For each $Item in GetObject($OU)
$cn = $Item.distinguishedName
$UP = GetObject("LDAP://"+$cn)

? $uP.FirstName +' '+ $uP.LastName +' '+$uP.scriptPath

if instr($uP.scriptPath,'smsls')
' changing'
$up.PutEx(1, "ScriptPath", "")
$up.setinfo
endif
$UP = 0
NEXT

_________________________
How to ask questions the smart way <-----------> Before you ask