Skip to content

New-NBDCIMRearPort

Since

v4.4.7

SYNOPSIS

Creates a new rear port on a device in Netbox.

SYNTAX

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

DESCRIPTION

Creates a new rear port on a specified device in the Netbox DCIM module. Rear ports represent the back-facing ports on patch panels or other devices that connect to front ports for pass-through cabling.

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

EXAMPLES

EXAMPLE 1

New-NBDCIMRearPort -Device 42 -Name "Rear 1" -Type "8p8c"

Creates a new RJ-45 rear port named 'Rear 1' on device 42.

EXAMPLE 2

New-NBDCIMRearPort -Device 42 -Name "Fiber-Rear-01" -Type "lc" -Positions 2

Creates a new LC fiber rear port that supports 2 front port positions.

EXAMPLE 3

New-NBDCIMRearPort -Device 42 -Name "Rear 1" -Type "8p8c" -Front_Ports @( @{ front_port = 100; front_port_position = 1; position = 1 } )

Creates a rear port with bidirectional front port mapping (Netbox 4.5+).

EXAMPLE 4

1..24 | ForEach-Object { New-NBDCIMRearPort -Device 42 -Name "Rear $_" -Type "8p8c" }

Creates 24 rear ports on a patch panel.

PARAMETERS

-Device

The database ID of the device to add the rear port to.

```yaml Type: UInt64 Parameter Sets: (All) Aliases:

Required: True Position: 1 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```

-Name

The name of the rear port (e.g., 'Rear 1', 'Back-01').

```yaml Type: String Parameter Sets: (All) Aliases:

Required: True Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ```

-Type

The connector type of the rear port. Common types include: - Copper: '8p8c' (RJ-45), '8p6c', '8p4c', '110-punch', 'bnc' - Fiber: 'lc', 'lc-apc', 'sc', 'sc-apc', 'st', 'mpo', 'mtrj' - Coax: 'f', 'n', 'bnc' - Other: 'splice', 'other'

```yaml Type: String Parameter Sets: (All) Aliases:

Required: True Position: 3 Default value: None 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)

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

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

-Module

The database ID of the module within the device (for modular devices).

```yaml Type: UInt64 Parameter Sets: (All) Aliases:

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

-Label

A physical label for the port (what's printed on the device).

```yaml 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 (e.g., 'ff0000' for red).

```yaml 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. Defaults to 1. Use higher values for multi-position rear ports.

```yaml Type: UInt16 Parameter Sets: (All) Aliases:

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

-Description

A description of the rear port.

```yaml Type: String Parameter Sets: (All) Aliases:

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

-Mark_Connected

Whether to mark this port as connected even without a cable object.

```yaml Type: Boolean Parameter Sets: (All) Aliases:

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

-Tags

Array of tag IDs to assign to this rear port.

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

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

-Raw

{{ Fill Raw Description }}

```yaml 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.

```yaml 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.

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

```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: v4.4.7

Common parameters

common request params

https://netbox.readthedocs.io/en/stable/models/dcim/rearport/