Skip to content

Set-NBDCIMRearPort

Since

v4.4.7

SYNOPSIS

Updates an existing rear port in Netbox DCIM module.

SYNTAX

Set-NBDCIMRearPort [-Id] <UInt64> [[-Device] <UInt64>] [[-Module] <UInt64>] [[-Name] <String>]
 [[-Label] <String>] [[-Type] <String>] [[-Color] <String>] [[-Positions] <UInt16>]
 [[-Front_Ports] <PSObject[]>] [[-Description] <String>] [[-Mark_Connected] <Boolean>] [[-Tags] <UInt64[]>]
 [-Force] [-Raw] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Updates an existing rear port in Netbox DCIM module. Supports pipeline input for Id parameter.

NOTE: Netbox 4.5+ introduces bidirectional port mappings. You can now specify front port mappings directly when updating a rear port using the Front_Ports parameter.

EXAMPLES

EXAMPLE 1

Set-NBDCIMRearPort -Id 1 -Name "Rear 1 Updated"

Updates the name of rear port with ID 1.

EXAMPLE 2

Set-NBDCIMRearPort -Id 1 -Front_Ports @(
    @{ front_port = 100; front_port_position = 1; position = 1 }
)

Updates the front port mappings using Netbox 4.5+ bidirectional format.

PARAMETERS

-Id

The database ID of the rear port to update.

Type: UInt64
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: 0
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Device

The database ID of the device.

Type: UInt64
Parameter Sets: (All)
Aliases:

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

-Module

The database ID of the module within the device.

Type: UInt64
Parameter Sets: (All)
Aliases:

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

-Name

The name of the rear port.

Type: String
Parameter Sets: (All)
Aliases:

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

-Label

A physical label for the port.

Type: String
Parameter Sets: (All)
Aliases:

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

-Type

The connector type of the rear port.

Type: String
Parameter Sets: (All)
Aliases:

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

-Color

The color of the port in 6-character hex format.

Type: String
Parameter Sets: (All)
Aliases:

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

-Positions

The number of front port positions this rear port supports.

Type: UInt16
Parameter Sets: (All)
Aliases:

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

-Front_Ports

Array of front port mappings for Netbox 4.5+ (bidirectional mapping). Each mapping should be a hashtable or PSCustomObject with: - front_port: (Required) The database ID of the front port - front_port_position: (Required) Position on the front port (1-1024) - position: (Required) Position on the rear port (1-1024)

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

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

-Description

A description of the rear port.

Type: String
Parameter Sets: (All)
Aliases:

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

-Mark_Connected

Whether to mark this port as connected.

Type: Boolean
Parameter Sets: (All)
Aliases:

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

-Tags

Array of tag IDs to assign to this rear port.

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

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

-Force

Skip confirmation prompt.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Raw

Return the raw API response object instead of the .results collection.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
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

Common parameters

common request params

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