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:

  1. Select Start > Run > services.msc to go to the Services console
  2. Right-click the Advanced Monitoring Agent and go to Log On
  3. Select This account and enter a user with enhanced privileges
  4. 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:

  1. Open the local security policy manager Start -> Run -> secpol.msc
  2. Expand Local Policies
  3. Click User Rights Assignment
  4. Add the user running the agent to the policies:
    • Shut down the system
    • Force shutdown from a remote system

  5. To add a user to the Local Security Policy:
    1. Double-click a security policy
    2. Click Add User or Group
    3. Enter the name of the user running the Agent (or the group that the user resides) in Enter the object names to select
    4. Click Check Names
    5. After the required users are selected, click OK in the open dialogs
  6. Local Security Policy should now show the added user in its summary.