I wrote these scrips to automate deployment/ patching across 200+ devices.
I usually run my PowerShell scripts directly from NinjaOne.
Here’s exactly how I do it step-by-step 👇
- Open NinjaOne and log in to the dashboard.
- Go to the Automation section on the left-hand menu.
- Click on Scripting.
- Click the blue “Add Script” button.
- In the pop-up window:
- Name: Give your script a clear name (example: “Clean Temp Files”).
- Category: Pick a category (like Maintenance or Custom).
- Language: Select PowerShell.
- Operating System: Choose Windows (or whichever applies).
- Copy your PowerShell code from your
.ps1file and paste it into the script box. - (Optional) If you want to run it with admin rights, check ✅ Run as System.
- Click Save.
- Go to Devices in NinjaOne.
- Select the computers or servers you want to run the script on.
- Click the “Run Script” option (the little play
▶️ icon). - Choose your script from the list.
- Click Run Now (or Schedule if you want it to run later).
- Watch the output or results in the Activity Log or Script Results section.
- Always test new scripts on one device before deploying to many.
- You can schedule recurring scripts under Policies → Scheduled Actions.
- Use the Script Output section in NinjaOne to see if your script succeeded or failed.
This is the exact process I follow for all my PowerShell automation tasks in NinjaOne. 🚀