Depending on the script or the permissions level of the user account running the Agent service, you may need to change the account to a higher permissions level for the script to complete.
To change the account to a higher permissions level:
- Select Start > Run > services.msc to go to the Services console
- Right-click the Advanced Monitoring Agent and go to Log On
- Select This account and enter a user with enhanced privileges
- Click OK to save changes and restart the service to apply the new settings
Local Policies - Reboot Script
When you use scripts you must ensure, particularly for the Reboot Script, the user account the Agent runs as has the correct privileges configured in the local security policy.
These required privileges are:
- Shut down the system
- Force shutdown from a remote system
This is generally not an issue if the Agent is running as an Administrator user, which allows the Reboot Script to successfully run.
To change a systems local security policy:
- Open the local security policy manager Start -> Run -> secpol.msc
- Expand Local Policies
- Click User Rights Assignment
- Add the user running the agent to the policies:
- To add a user to the Local Security Policy:
Local Security Policy should now show the added user in its summary.