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

Index of PowerShell Commands and Articles

Topic

This article provides a list of customized NinjaOne cmdlets and the tasks they perform.

If you use the NinjaOne PowerShell Module outside of an automation script, you may need to adjust PowerShell's execution policy. For more information about execution policies, refer to Microsoft's documentation: about Execution Policies (external link).

Environment

  • NinjaOne
  • Microsoft PowerShell

Description

When you install the NinjaOne agent, NinjaOne deploys and loads a custom NinjaOne PowerShell module for interacting with custom fields. You can access the ninjarmm-cli on Windows devices via this PowerShell module simply by calling the function names within PowerShell.

NinjaOne PowerShell cmdlets

PowerShell cmdlets are commands you can use to create and run automation scripts using the  PowerShell command line tool. The PowerShell commands you can run are detailed below. Click any cmndlet name in the list to open a document containing detailed information about how to use the command.

cmdlet Purpose
Get-NinjaProperty Retrieve and convert the value of a custom field based on its name and type.
Get-NinjaTag Retrieve the system tags currently assigned to a device.
Get-NinjaUnmanaged Device Retrieve unmanaged devices associated with the current device.
New-NinjaUnmanaged Device Create a new unmanaged device with your specified details.
Ninja-Property-Clear Clear the value of a specified custom field.
Ninja-Property-Docs-Clear Clear the value of a specified custom field in a document.
Ninja-Property-Docs-Clear-Single Clear the value of a specified custom field in a single document.
Ninja-Property-Docs-Get Retrieve the value of a specified custom field in a document.
Ninja-Property-Get-Single Retrieve the value of a specified custom field in a single document.
Ninja-Property-Docs-Names Retrieve the ID or name of documents associated with a template id.
Ninja-Property-Docs-Options Retrieve valid values for a dropdown or multi-select custom field in a document.
Ninja-Property-Options-Single Retrieve valid values for a dropdown or multi-select custom field in a single document.
Ninja-Property-Docs-Set Set the value of a specified custom field in a document.
Ninja-Property-Docs-Set-Piped Set the value of a specified custom field in a document using the PowerShell pipeline.
Ninja-Property-Docs-Set-Single Set the value of a specified custom field in a single document
Ninja-Property-Docs-Set-Single-Piped Set the value of a specified custom field in a single document using the PowerShell pipeline.
Ninja-Property-Docs-Templates Retrieve a list of templates containing documents and attributes.
Ninja-Property-Get Retrieve the value of a specified device custom field. This is a legacy cmdlet. Use Get-NinjaProperty instead.
Ninja-Property-Options Retrieve valid values for a dropdown or multi-select custom field for a device.
Ninja-Property-Set Set the value of a specified device custom field. This is a legacy cmdlet. Use Set-NinjaProperty instead.
Ninja-Property-Set-Piped Set the value of a specified custom field for a device using the PowerShell pipeline.
Options-NinjaTag List all possible system tags for a device.
Remove-NinjaTag Remove a specified system tag from a device.
Set-NinjaProperty Set the value of a custom field based on its name and type.
Set NinjaTag Assign a specified system tag to the current device.
Set-NinjaUnmanagedDevice Update the attributes of a specified unmanaged device.
Set-NinjaUser Assign a specified user to a device.

Additional Resources

For more information about asset management and custom scripting, refer to the following resources:

FAQ

Next Steps