Get-NBDCIMDevice
Since
v1.0.4
SYNOPSIS
Retrieves Devices objects from Netbox DCIM module.
SYNTAX
Query (Default)
Get-NBDCIMDevice [-All] [-PageSize <Int32>] [-Brief] [-Fields <String[]>] [-Omit <String[]>]
[-IncludeConfigContext] [-Limit <UInt16>] [-Offset <UInt16>] [-Query <String>] [-Name <String>]
[-Manufacturer_Id <UInt64>] [-Manufacturer <String>] [-Device_Type_Id <UInt64>] [-Role_Id <UInt64>]
[-Role <String>] [-Tenant_Id <UInt64>] [-Tenant <String>] [-Platform_Id <UInt64>] [-Platform <String>]
[-Asset_Tag <String>] [-Site_Id <UInt64>] [-Site <String>] [-Rack_Group_Id <UInt64>] [-Rack_Id <UInt64>]
[-Cluster_Id <UInt64>] [-Model <UInt64>] [-Status <String>] [-Is_Full_Depth <Boolean>]
[-Is_Console_Server <Boolean>] [-Is_PDU <Boolean>] [-Is_Network_Device <Boolean>] [-MAC_Address <String>]
[-Has_Primary_IP <Boolean>] [-Virtual_Chassis_Id <UInt64>] [-Position <UInt16>] [-Serial <String>] [-Raw]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
ByID
Get-NBDCIMDevice [-All] [-PageSize <Int32>] [-Brief] [-Fields <String[]>] [-Omit <String[]>]
[-IncludeConfigContext] [-Limit <UInt16>] [-Offset <UInt16>] [-Id <UInt64[]>] [-Raw]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Retrieves Devices objects from Netbox DCIM module. Supports automatic pagination with the -All switch.
By default, config_context is excluded from the response for performance. Use -IncludeConfigContext to include it when needed.
EXAMPLES
EXAMPLE 1
Get-NBDCIMDevice
Returns the first page of devices (config_context excluded by default).
EXAMPLE 2
Get-NBDCIMDevice -All
Returns all devices with automatic pagination.
EXAMPLE 3
Get-NBDCIMDevice -Brief
Returns minimal device representations for dropdowns.
EXAMPLE 4
Get-NBDCIMDevice -Fields 'id','name','status','site.name'
Returns only the specified fields.
EXAMPLE 5
Get-NBDCIMDevice -IncludeConfigContext
Returns devices with config_context included.
EXAMPLE 6
Get-NBDCIMDevice -Omit 'comments','description'
Returns devices without comments and description fields (Netbox 4.5+).
EXAMPLE 7
Get-NBDCIMDevice -All -PageSize 200 -Verbose
Returns all devices with 200 items per request, showing progress.
PARAMETERS
-All
Automatically fetch all pages of results. Uses the API's pagination to retrieve all items across multiple requests.
```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-PageSize
Number of items per page when using -All. Default: 100. Range: 1-1000.
```yaml Type: Int32 Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: 100 Accept pipeline input: False Accept wildcard characters: False ```
-Brief
Return a minimal representation of objects (id, url, display, name only). Reduces response size by ~90%. Ideal for dropdowns and reference lists.
```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Fields
Specify which fields to include in the response. Supports nested field selection (e.g., 'site.name', 'device_type.model').
```yaml Type: String[] Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Omit
Specify which fields to exclude from the response. Requires Netbox 4.5.0 or later.
```yaml Type: String[] Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-IncludeConfigContext
Include config_context in the response. By default, config_context is excluded for performance (can be 10-100x faster without it).
```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Limit
{{ Fill Limit Description }}
```yaml Type: UInt16 Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Offset
{{ Fill Offset Description }}
```yaml Type: UInt16 Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Id
{{ Fill Id Description }}
```yaml Type: UInt64[] Parameter Sets: ByID Aliases:
Required: False Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ```
-Query
Search query (maps to the 'q' API filter). Matches against device name and primary IP address. Note: in Netbox 4.5.3+, this only matches the primary IP, not all assigned IPs.
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Name
{{ Fill Name Description }}
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Manufacturer_Id
{{ Fill Manufacturer_Id Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Manufacturer
{{ Fill Manufacturer Description }}
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Device_Type_Id
{{ Fill Device_Type_Id Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Role_Id
{{ Fill Role_Id Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Role
{{ Fill Role Description }}
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Tenant_Id
{{ Fill Tenant_Id Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Tenant
{{ Fill Tenant Description }}
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Platform_Id
{{ Fill Platform_Id Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Platform
{{ Fill Platform Description }}
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Asset_Tag
{{ Fill Asset_Tag Description }}
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Site_Id
{{ Fill Site_Id Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Site
{{ Fill Site Description }}
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Rack_Group_Id
{{ Fill Rack_Group_Id Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Rack_Id
{{ Fill Rack_Id Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Cluster_Id
{{ Fill Cluster_Id Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Model
{{ Fill Model Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Status
{{ Fill Status Description }}
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Is_Full_Depth
{{ Fill Is_Full_Depth Description }}
```yaml Type: Boolean Parameter Sets: Query Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Is_Console_Server
{{ Fill Is_Console_Server Description }}
```yaml Type: Boolean Parameter Sets: Query Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Is_PDU
{{ Fill Is_PDU Description }}
```yaml Type: Boolean Parameter Sets: Query Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Is_Network_Device
{{ Fill Is_Network_Device Description }}
```yaml Type: Boolean Parameter Sets: Query Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-MAC_Address
{{ Fill MAC_Address Description }}
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Has_Primary_IP
{{ Fill Has_Primary_IP Description }}
```yaml Type: Boolean Parameter Sets: Query Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Virtual_Chassis_Id
{{ Fill Virtual_Chassis_Id Description }}
```yaml Type: UInt64 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Position
{{ Fill Position Description }}
```yaml Type: UInt16 Parameter Sets: Query Aliases:
Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Serial
{{ Fill Serial Description }}
```yaml Type: String Parameter Sets: Query Aliases:
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Raw
Return the raw API response instead of the results array.
```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-ProgressAction
{{ Fill ProgressAction Description }}
```yaml Type: ActionPreference Parameter Sets: (All) Aliases: proga
Required: False Position: Named Default value: None 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
System.Management.Automation.PSObject
NOTES
AddedInVersion: v1.0.4 The -Brief, -Fields, and -Omit parameters are mutually exclusive.