ADMS provides for the ability to run external custom scripts but these scripts are not covered by KAMAR or ITed support. It is the responsibility of the Network or System Admin tasked with managing the directory to create and test these external scripts. No responsibility will be taken for the misadventure resulting from a user created script.
This service supports both batch and vb scripts. If you want to run PowerShell scripts you will need to use either a batch or VB script as an intermediary remembering to pass the required parameters through.
When Scripts are called
There are four actions that can trigger the running of an external custom script and each action can have it's own script assigned. Check the box next to the trigger action and click in the text field to open Windows Explorer and browse to the location of the script you wish to run.
For KDMS it is entered here:
In ADMS it is entered on the Students page:
The following actions will trigger a script to be called:
- Student New
- Student Move
- Student Update
- Student Leave
- Staff New
- Staff Move
- Staff Update
- Staff Leave
When each script is triggered, the following parameters will be passed:
- unique id
- unique id
The following settings are available in the 'Settings' file for the Directory Service.
After making changes, you will need to restart the KDSM in order for the changes to be read.
- TechConfig/ScriptTimeOut (Integer)
- UserConfig/Student/NewStudentScript/RunScript (True / False)
- UserConfig/Student/MoveStudentScript/RunScript (True / False)
- UserConfig/Student/UpdateStudentDetailsScript/RunScript (True / False)
- UserConfig/Student/StudentLeaverScript/RunScript (True / False)
- UserConfig/Staff/NewStaffScript/RunScript (True / False)
- UserConfig/Staff/MoveStaffScript/RunScript (True / False)
- UserConfig/Staff/UpdateStaffDetailsScript/RunScript (True / False)
- UserConfig/Staff/StaffLeaverScript/RunScript (True / False )
When you save the config, the location will be saved against the trigger and the RunScript value will be changed from False to True. To check the settings, open the KDSM.cfg file using Notepad and navigate to <Student> to view the script information (or <Staff> for the staff scripts).