Issue
When attempting to run a command via the CLI in Ninja, an error message similar to, "...is not recognized as an internal or external command, operable program or batch file" appears.

Environment
NinjaOne Endpoint Management
Cause
This issue can occur when a 32-bit script is attempting to run in a 64-bit environment.
Resolution
To verify the syntax and validity of the command, you can attempt to run the same command locally on your device. If the command runs successfully, try using the following Microsoft value to run the command via NinjaOne CLI in a sysnative environment:
%WINDIR%sysnative<YourCommand>Replace your command with the original command that you wish to run.
If the issue you are experiencing is not listed above, or if you need further assistance after attempting the recommended troubleshooting steps, please contact Ninja Support.
Additional Resources
Refer to Scripting, Automation, CLI: Resource Catalog to learn more about automation in NinjaOne.