Already a NinjaOne customer? Log in to view more guides and the latest updates.

Custom Script: Restart NinjaRMMAgent

Topic

This script allows you to restart the domain controller, which may be necessary if you move a domain controller from one organization to another, for example.

Environment

NinjaOne Endpoint Management

Description

Occasionally, as part of your troubleshooting, you may need to restart the NinjaRMMAgent. To do so, you can upload the following batch script to your Script Library. You can then run it on devices ad hoc as needed:

start cmd /c "ping 1.1.1.1 -n 75 -w 1000 & taskkill /im ninjarmmagent.exe /f & net stop NinjaRMMAgent & ping 1.1.1.1 -n 75 -w 1000 & net start NinjaRMMAgent"
Please review the attached script for Linux devices.

Additional Resources

Refer to  Scripting, Automation, CLI: Resource Catalog to learn more about automation in NinjaOne.

FAQ

Next Steps