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.

cmdletPurpose
Get-NinjaPropertyRetrieve and convert the value of a custom field based on its name and type.
Get-NinjaTagRetrieve the system tags currently assigned to a device.
Get-NinjaUnmanaged DeviceRetrieve unmanaged devices associated with the current device.
New-NinjaUnmanaged DeviceCreate a new unmanaged device with your specified details.
Ninja-Property-ClearClear the value of a specified custom field.
Ninja-Property-Docs-ClearClear the value of a specified custom field in a document.
Ninja-Property-Docs-Clear-SingleClear the value of a specified custom field in a single document.
Ninja-Property-Docs-GetRetrieve the value of a specified custom field in a document.
Ninja-Property-Get-SingleRetrieve the value of a specified custom field in a single document.
Ninja-Property-Docs-NamesRetrieve the ID or name of documents associated with a template id.
Ninja-Property-Docs-OptionsRetrieve valid values for a dropdown or multi-select custom field in a document.
Ninja-Property-Options-SingleRetrieve valid values for a dropdown or multi-select custom field in a single document.
Ninja-Property-Docs-SetSet the value of a specified custom field in a document.
Ninja-Property-Docs-Set-PipedSet the value of a specified custom field in a document using the PowerShell pipeline.
Ninja-Property-Docs-Set-SingleSet the value of a specified custom field in a single document
Ninja-Property-Docs-Set-Single-PipedSet the value of a specified custom field in a single document using the PowerShell pipeline.
Ninja-Property-Docs-TemplatesRetrieve a list of templates containing documents and attributes.
Ninja-Property-GetRetrieve the value of a specified device custom field. This is a legacy cmdlet. Use Get-NinjaProperty instead.
Ninja-Property-OptionsRetrieve valid values for a dropdown or multi-select custom field for a device.
Ninja-Property-SetSet the value of a specified device custom field. This is a legacy cmdlet. Use Set-NinjaProperty instead.
Ninja-Property-Set-PipedSet the value of a specified custom field for a device using the PowerShell pipeline.
Options-NinjaTagList all possible system tags for a device.
Remove-NinjaTagRemove a specified system tag from a device.
Set-NinjaPropertySet the value of a custom field based on its name and type.
Set NinjaTagAssign a specified system tag to the current device.
Set-NinjaUnmanagedDeviceUpdate the attributes of a specified unmanaged device.
Set-NinjaUserAssign 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