- Copy the code from this repositories .ps1 file labeled CreateLocalAdministrator.ps1.
- In NinjaRMM, go to Administration > Library > Automation > Add Automation > New Script
- Paste the script contents directly inside of the NinjaRMM text editor.
- Copy the script settings from the image below.
- Language: Powershell,
- Operating System: Windows,
- Architecture: All,
- RunAs: System,
Script Variables:
- String/Text: AUserName
- String/Text: NinjaProperty
- You will need to create your device custom fields. Please go to Administration > Devices > Device Custom Fields > Add Custom Field
- Type: Text
- Enheritance > Enable Enheritance for Device
- Permissions > Automations: Read/Write