NinjaOne icon

NinjaOne

Consume NinjaOne API

Actions158

Management → Control Windows Service

AI-generated

Overview

This node allows controlling Windows services on a specified device through the NinjaOne API. It supports actions such as starting, pausing, stopping, and restarting a Windows service identified by its service ID on a target device identified by its device ID.

Typical use cases include automating service management tasks across multiple devices in an IT environment, such as remotely restarting a critical service after deployment or stopping unnecessary services to free resources.

For example, an IT administrator can use this node to restart the "Print Spooler" service on a remote workstation after applying printer driver updates.

Properties

Name Meaning
Id Numeric identifier of the target device where the Windows service is running.
Service Id String identifier of the Windows service to control on the specified device.
Action The operation to perform on the service. Options: START, PAUSE, STOP, RESTART.

Output

The node outputs JSON data representing the response from the NinjaOne API after performing the requested action on the Windows service. This typically includes status information about the service control operation.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to the NinjaOne API using OAuth2 authentication.
  • The node depends on proper configuration of the NinjaOne API credentials within n8n.
  • Network access to the NinjaOne service endpoint is necessary.

Troubleshooting

  • Common issues:

    • Invalid device or service identifiers may cause the API call to fail.
    • Insufficient permissions or expired API tokens can result in authentication errors.
    • Network connectivity problems may prevent communication with the NinjaOne API.
  • Error messages:

    • Errors returned from the NinjaOne API will be included in the node's output if "Continue On Fail" is enabled.
    • Typical error messages might indicate "Device not found", "Service not found", or "Unauthorized".
  • Resolutions:

    • Verify that the device ID and service ID are correct and exist in the NinjaOne system.
    • Ensure the API credentials are valid and have sufficient permissions.
    • Check network connectivity and firewall settings.

Links and References

Discussion