Richard

I wanted to do simular here is what i did
just add the following line after it sets the password

$adsUser.put("PasswordExpired", 1)

this will force the user to change password when he logs in

hope this helps

Pete