Well right now here is what I have

code:
Break ON
; Example of LDAP call. GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com")
; You need to know your LDAP connection. You can maybe find it by checking the propery details on the OU for your users.
$target = GetObject("LDAP://ou=Users,ou=Test,dc=sussexcounty,dc=net")
$loginscript="logon.bat"
For Each $user in $target
If $user.loginscript <> "$loginscript"
? "Current Script for " +$user.name " is: " +$user.loginscript+ " Should be: " +$loginscript
; $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
; $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
EndIf
Next

I don't know if I changed it to be correct or not. The user is located in the Test OU and the domain is sussexcounty.net