Skip to content

Get-NBDCIMCable

Since

v4.4.7

SYNOPSIS

Retrieves cable objects from Netbox DCIM module.

SYNTAX

Query (Default)

Get-NBDCIMCable [-All] [-PageSize <Int32>] [-Brief] [-Fields <String[]>] [-Omit <String[]>] [-Limit <UInt16>]
 [-Offset <UInt16>] [-Label <String>] [-Termination_A_Type <String>] [-Termination_A_ID <UInt64>]
 [-Termination_B_Type <String>] [-Termination_B_ID <UInt64>] [-Type <String>] [-Status <String>]
 [-Color <String>] [-Cable_Profile <String>] [-Device_ID <UInt64>] [-Device <String>] [-Rack_Id <UInt64>]
 [-Rack <String>] [-Location_ID <UInt64>] [-Location <String>] [-Raw] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

ByID

Get-NBDCIMCable [-All] [-PageSize <Int32>] [-Brief] [-Fields <String[]>] [-Omit <String[]>] [-Limit <UInt16>]
 [-Offset <UInt16>] [-Id <UInt64[]>] [-Raw] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Retrieves cable objects from Netbox DCIM module. Supports filtering by various parameters including profile (Netbox 4.5+).

EXAMPLES

EXAMPLE 1

Get-NBDCIMCable

EXAMPLE 2

Get-NBDCIMCable -Cable_Profile '1c4p-4c1p'

EXAMPLE 3

Get-NBDCIMCable -Status 'connected' -Device_ID 5

PARAMETERS

-All

Retrieve all cables (pagination handled automatically).

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-PageSize

Number of results per page (1-1000, default 100).

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.

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').

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.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Limit

Maximum number of results to return.

Type: UInt16
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Offset

Number of results to skip.

Type: UInt16
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Id

Filter by cable ID(s).

Type: UInt64[]
Parameter Sets: ByID
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Label

Filter by cable label.

Type: String
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Termination_A_Type

Filter by termination a type.

Type: String
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Termination_A_ID

Filter by termination a database ID.

Type: UInt64
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Termination_B_Type

Filter by termination b type.

Type: String
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Termination_B_ID

Filter by termination b database ID.

Type: UInt64
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Type

Filter by cable type.

Type: String
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status

Filter by cable status.

Type: String
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Color

Filter by cable color.

Type: String
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Cable_Profile

Filter by cable profile (Netbox 4.5+ only).

Type: String
Parameter Sets: Query
Aliases: Profile

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Device_ID

Filter by device ID.

Type: UInt64
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Device

Filter by device name.

Type: String
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Rack_Id

Filter by rack ID.

Type: UInt64
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Rack

Filter by rack name.

Type: String
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location_ID

Filter by location ID.

Type: UInt64
Parameter Sets: Query
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Location

Filter by location name.

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.

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 }}

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: v4.4.7 The -Brief, -Fields, and -Omit parameters are mutually exclusive.

Common parameters

common request params
common pagination params

https://netbox.readthedocs.io/en/stable/rest-api/overview/