Just ssh to the controller and use the following commands to change it - here a example for WLAN Service ABCDEF.....
- ssh to the controller
# wlans
# ABCDEF
# priv
# psk abcdefghijklmnop
# apply
If you've the skills to write a script to do that... why not.
-Ron