Skip to content

New-NBIPAMVLAN

Since

v1.0.4

SYNOPSIS

Creates one or more VLANs in Netbox IPAM module.

SYNTAX

Single (Default)

New-NBIPAMVLAN -VID <UInt16> -Name <String> [-Status <String>] [-Tenant <UInt64>] [-Site <UInt64>] [-Group <UInt64>] [-Role <UInt64>] [-Description <String>] [-Custom_Fields <Hashtable>] [-Owner <UInt64>] [-Tags <Object[]>] [-Raw] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

Bulk

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

DESCRIPTION

Creates new VLANs in Netbox IPAM module. Supports both single VLAN creation with individual parameters and bulk creation via pipeline input.

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

EXAMPLES

EXAMPLE 1

New-NBIPAMVLAN -VID 100 -Name "Production" -Site 1

Creates a single VLAN.

EXAMPLE 2

$vlans = 100..199 | ForEach-Object { [PSCustomObject]@{VID=$_; Name="VLAN$_"; Status="active"; Site=1} } $vlans | New-NBIPAMVLAN -BatchSize 50 -Force

Creates 100 VLANs in bulk using 2 API calls.

EXAMPLE 3

Import-Csv vlans.csv | New-NBIPAMVLAN -BatchSize 100 -Force

Bulk import VLANs from CSV file.

PARAMETERS

-VID

The VLAN ID (1-4094). Required for single VLAN creation.

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

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

-Name

The name of the VLAN. Required for single VLAN creation.

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

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

-Status

Status of the VLAN. Defaults to 'Active'.

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

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

-Tenant

The tenant ID.

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

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

-Site

The site ID.

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

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

-Group

The VLAN group ID.

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

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

-Role

The role ID.

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

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

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

-Custom_Fields

Hashtable of custom field values.

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

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

-Owner

The owner ID for object ownership (Netbox 4.5+ only).

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

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

-InputObject

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

```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 VLANs 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

Common parameters

```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/ipam/vlan/