Get Custom Fields Query
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.
EXAMPLE 6
Get-NinjaOneCustomFields -detailed
Gets the detailed version of the custom field values.
PARAMETERS
-deviceFilter
Filter devices.
Type: String
Parameter Sets: Default
Aliases: df
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-cursor
Cursor name.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-pageSize
Number of results per page.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-scopes
Custom field scopes to filter by.
Type: String[]
Parameter Sets: Scoped
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-updatedAfter
Custom fields updated after the specified date. PowerShell DateTime object.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-updatedAfterUnixEpoch
Custom fields updated after the specified date. Unix Epoch time.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-fields
Array of fields.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-detailed
Get the detailed custom fields report(s).
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
A powershell object containing the response.
NOTES
RELATED LINKS
https://docs.homotechsual.dev/modules/ninjaone/commandlets/Get/customfieldsquery