Definitely possible..

Prompt for the userID and save in a $User var.

Use the fnLDAPQuery to return a pair of values you want to use to create the new password. Use Left(), Right(), or SubStr() to cut the data you want. Save the password in $NewPassword.

The following will set the password:
 Code:
  $objUser = getobject('WinNT://' + $UserID + ',user')

  If $objUser
    $objUser.PasswordExpired = 1        ; force change at next logon
    $objUser.setPassword($NewPassword)  ; define new password
    $objUser.SetInfo
  Else
    'Failed to set password.' @CRLF
  EndIf
You'll need to play with the code to get what you want, but with fnLDAPQuery and the sample above, you've got some direction.

fnLDAPQuery is available here on KORG or (a slightly updated version) in the Kixtart UDF Library on my web site. Be sure to include the external function at the end of your script.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D