Skip to content

New-NBDCIMInterface

Since

v1.0.4

SYNOPSIS

Creates one or more interfaces on devices in Netbox DCIM module.

SYNTAX

Single (Default)

New-NBDCIMInterface -Device <UInt64> -Name <String> [-Type <String>] [-Label <String>] [-Parent <UInt64>] [-Bridge <UInt64>] [-Speed <UInt64>] [-Duplex <String>] [-Mark_Connected <Boolean>] [-WWN <String>] [-VDCS <UInt64[]>] [-POE_Mode <String>] [-POE_Type <String>] [-Vlan_Group <UInt64>] [-QinQ_SVLAN <UInt64>] [-VRF <UInt64>] [-RF_Role <String>] [-RF_Channel <String>] [-RF_Channel_Frequency <Int32>] [-RF_Channel_Width <Int32>] [-TX_Power <Int32>] [-Primary_MAC_Address <UInt64>] [-Owner <UInt64>] [-Changelog_Message <String>] [-Enabled <Boolean>] [-MTU <UInt16>] [-MAC_Address <String>] [-MGMT_Only <Boolean>] [-LAG <UInt64>] [-Description <String>] [-Mode <String>] [-Untagged_VLAN <UInt64>] [-Tagged_VLANs <UInt64[]>] [-Tags <Object[]>] [-Raw] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

Bulk

New-NBDCIMInterface -InputObject <PSObject> [-BatchSize <Int32>] [-Force] [-Tags <Object[]>] [-Raw] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Creates new network interfaces on specified devices. Supports both single interface creation with individual parameters and bulk creation via pipeline input.

For bulk operations, use the -BatchSize parameter to control how many interfaces are sent per API request. This significantly improves performance when creating many interfaces.

EXAMPLES

EXAMPLE 1

New-NBDCIMInterface -Device 42 -Name "eth0" -Type "1000base-t"

Creates a new 1GbE interface named 'eth0' on device ID 42.

EXAMPLE 2

New-NBDCIMInterface -Device 42 -Name "bond0" -Type "lag" -Description "Server uplink LAG"

Creates a new LAG interface for link aggregation.

EXAMPLE 3

$interfaces = 0..47 | ForEach-Object { [PSCustomObject]@{Device=42; Name="eth$_"; Type="1000base-t"} } $interfaces | New-NBDCIMInterface -BatchSize 50 -Force

Creates 48 interfaces in bulk using a single API call.

EXAMPLE 4

Import-Csv interfaces.csv | New-NBDCIMInterface -BatchSize 100 -Force

Bulk import interfaces from CSV file.

PARAMETERS

-Device

The database ID of the device to add the interface to.

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-Name

The name of the interface (e.g., 'eth0', 'GigabitEthernet0/1').

```yaml Type: String Parameter Sets: Single Aliases:

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

-Type

The interface type. Supports physical types (1000base-t, 10gbase-x-sfpp, etc.), virtual types (virtual, bridge, lag), and wireless types (ieee802.11ac, etc.).

```yaml Type: String Parameter Sets: Single Aliases:

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

-Label

Physical label assigned to the interface.

```yaml Type: String Parameter Sets: Single Aliases:

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

-Parent

Numeric ID of the parent interface (for subinterfaces).

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-Bridge

Numeric ID of the bridge this interface belongs to.

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-Speed

Speed of the interface in Kbps (e.g., 1000000 for 1Gbps).

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-Duplex

Duplex mode. One of: 'full', 'half', 'auto'.

```yaml Type: String Parameter Sets: Single Aliases:

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

-Mark_Connected

If $true, the interface is marked as connected independent of cable state.

```yaml Type: Boolean Parameter Sets: Single Aliases:

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

-WWN

World Wide Name for Fibre Channel interfaces (8 groups of 2 hex digits, colon-separated, e.g. 'AA:BB:CC:DD:EE:FF:00:11').

```yaml Type: String Parameter Sets: Single Aliases:

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

-VDCS

Array of Virtual Device Context numeric IDs.

```yaml Type: UInt64[] Parameter Sets: Single Aliases:

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

-POE_Mode

Power-over-Ethernet mode. One of: 'pd', 'pse'.

```yaml Type: String Parameter Sets: Single Aliases:

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

-POE_Type

Power-over-Ethernet type. One of: 'type1-ieee802.3af', 'type2-ieee802.3at', 'type3-ieee802.3bt', 'type4-ieee802.3bt', 'passive-24v-2pair', 'passive-24v-4pair', 'passive-48v-2pair', 'passive-48v-4pair'.

```yaml Type: String Parameter Sets: Single Aliases:

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

-Vlan_Group

Numeric ID of the VLAN group this interface belongs to.

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-QinQ_SVLAN

Numeric ID of the Service VLAN for QinQ.

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-VRF

Numeric ID of the VRF this interface belongs to.

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-RF_Role

Wireless RF role. One of: 'ap', 'station'.

```yaml Type: String Parameter Sets: Single Aliases:

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

-RF_Channel

Wireless RF channel identifier (e.g. '2.4g-1-2412-22').

```yaml Type: String Parameter Sets: Single Aliases:

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

-RF_Channel_Frequency

Wireless RF channel frequency in MHz (1-1000000).

```yaml Type: Int32 Parameter Sets: Single Aliases:

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

-RF_Channel_Width

Wireless RF channel width in MHz (1-10000).

```yaml Type: Int32 Parameter Sets: Single Aliases:

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

-TX_Power

Wireless transmit power in dBm.

```yaml Type: Int32 Parameter Sets: Single Aliases:

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

-Primary_MAC_Address

Numeric ID of the primary MAC address record. Use New-NBDCIMMACAddress to create a MAC address record, then pass its id here.

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-Owner

Numeric ID of the owning user or team.

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-Changelog_Message

Free-form message recorded in the Netbox changelog entry for this operation.

```yaml Type: String Parameter Sets: Single Aliases:

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

-Enabled

Whether the interface is enabled. Defaults to true if not specified.

```yaml Type: Boolean Parameter Sets: Single Aliases:

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

-MTU

Maximum Transmission Unit size (typically 1500 for Ethernet).

```yaml Type: UInt16 Parameter Sets: Single Aliases:

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

-MAC_Address

The MAC address of the interface in format XX:XX:XX:XX:XX:XX.

```yaml Type: String Parameter Sets: Single Aliases:

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

-MGMT_Only

If true, this interface is used for management traffic only.

```yaml Type: Boolean Parameter Sets: Single Aliases:

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

-LAG

The database ID of the LAG interface this interface belongs to.

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-Description

A description of the interface.

```yaml Type: String Parameter Sets: Single Aliases:

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

-Mode

VLAN mode: 'Access' (untagged), 'Tagged' (trunk), or 'Tagged All'.

```yaml Type: String Parameter Sets: Single Aliases:

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

-Untagged_VLAN

The database ID of the VLAN object for the untagged/native VLAN.

```yaml Type: UInt64 Parameter Sets: Single Aliases:

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

-Tagged_VLANs

Array of database IDs of VLAN objects for tagged VLANs.

```yaml Type: UInt64[] Parameter Sets: Single Aliases:

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

-InputObject

Pipeline input for bulk operations. Each object should contain the required properties: Device, Name, Type.

```yaml Type: PSObject Parameter Sets: Bulk Aliases:

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

-BatchSize

Number of interfaces to create per API request in bulk mode. Default: 50, Range: 1-1000

```yaml Type: Int32 Parameter Sets: Bulk Aliases:

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

-Force

Skip confirmation prompts for bulk operations.

```yaml Type: SwitchParameter Parameter Sets: Bulk Aliases:

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

-Tags

Array of tag objects (e.g. PSCustomObject with slug and color properties).

```yaml Type: Object[] Parameter Sets: (All) 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 ```

-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: v1.0.4

Common parameters

common request params
common bulk params

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