additionally i want users not been able to uninstall the ITSM from workgroup pc
Aside from making sure that the computer user is not using an ‘administrator’ user account and enforcing it through Group Policy (if this is used), you can utilize the ‘Client Access Control’ section in the associated Profile.
We don’t need a script to Restrict uninstalling the ITSM agent. We can create a single profile to enable authentication for ITSM agent and assign it to multiple devices. By this profile, User cannot uninstall the ITSM agent without the administrator password/Custom password.
Please refer to the following wiki topic to use it effectively
The user should disable the option “Create alert tickets on service desk” in Alert settings. If “Value” is the alert that is used in monitoring then in Alert settings for Value the user need to disable it. Please see attached screenshot for your reference.
I run both as procedure to the machine i test and i did not shcdule as is pointless i guess. Also the comment in the script code you have them the othe way around as you send me like 1 restart and 0 to shutdown but that is ok is a comment we can easy change.