Same code, only all the error logging removed.

Should run exactly the same. I posted this code using PostPrep which allows you to copy it directly from here and paste into your text editor and maintain the formatting of the code is all.



Break ON
$target = GetObject("LDAP://OU=Test,OU=Information Systems,OU=AdminBldg,DC=sussexcounty,DC=net")
$loginscript="logon.bat"
For Each $user in $target
  $script = $user.loginscript 
  If $Script <$loginscript
    ? "Current Script for " +$user.name " is: " +$script" Should be: " +$loginscript
    $user.loginscript=$loginscript
    $user.SetInfo
  EndIf
Next