Get Custom Fields Query
Generated Cmdlet Help
This page has been generated from the NinjaOne PowerShell module source. To make changes please edit the appropriate PowerShell source file.
SYNOPSIS
Gets the custom fields from the NinjaOne API.
SYNTAX
Default (Default)
Get-NinjaOneCustomFields [[-deviceFilter] <String>] [[-cursor] <String>] [[-pageSize] <Int32>]
[[-updatedAfter] <DateTime>] [[-updatedAfterUnixEpoch] <Int32>] [[-fields] <String[]>] [-detailed]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Scoped
Get-NinjaOneCustomFields [[-cursor] <String>] [[-pageSize] <Int32>] [[-scopes] <String[]>]
[[-updatedAfter] <DateTime>] [[-updatedAfterUnixEpoch] <Int32>] [[-fields] <String[]>] [-detailed]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Retrieves the custom fields from the NinjaOne v2 API.
EXAMPLES
EXAMPLE 1
Get-NinjaOneCustomFields
Gets all custom field values for all devices.
EXAMPLE 2
Get-NinjaOneCustomFields -deviceFilter 'org = 1'
Gets all custom field values for all devices in the organisation with id 1.
EXAMPLE 3
Get-NinjaOneCustomFields -updatedAfter (Get-Date).AddDays(-1)
Gets all custom field values for all devices updated in the last 24 hours.
EXAMPLE 4
Get-NinjaOneCustomFields -updatedAfterUnixEpoch 1619712000
Gets all custom field values for all devices updated at or after 1619712000.
EXAMPLE 5
Get-NinjaOneCustomFields -fields 'hasBatteries', 'autopilotHwid'
Gets the custom field values for the specified fields.