How to reconfigure the NS Agent via script