Remove-NBDCIMDevice
Since
v1.0.4
SYNOPSIS
Deletes one or more devices from Netbox DCIM module.
SYNTAX
Single (Default)
Remove-NBDCIMDevice -Id <UInt64> [-Force] [-Raw] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Bulk
Remove-NBDCIMDevice -InputObject <PSObject> [-BatchSize <Int32>] [-Force] [-Raw]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Deletes devices from Netbox by ID. Supports both single device deletion and bulk deletion via pipeline input.
For bulk operations, use the -BatchSize parameter to control how many devices are deleted per API request.
WARNING: This operation cannot be undone. Deleted devices and their associated data (interfaces, connections, etc.) will be permanently removed.
EXAMPLES
EXAMPLE 1
Remove-NBDCIMDevice -Id 123 -Force
Deletes device 123 without confirmation.
EXAMPLE 2
Remove-NBDCIMDevice -Id 100, 101, 102 -Force
Deletes multiple devices by ID.
EXAMPLE 3
Get-NBDCIMDevice -Status "decommissioning" | Remove-NBDCIMDevice -Force
Bulk delete all devices in decommissioning status.
EXAMPLE 4
Get-NBDCIMDevice -Query "temp-*" | Remove-NBDCIMDevice -BatchSize 50 -Force
Bulk delete devices matching a pattern with batching.
PARAMETERS
-Id
Database ID(s) of the device(s) to delete. Required for single mode.
Type: UInt64
Parameter Sets: Single
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-InputObject
Pipeline input for bulk operations. Each object must have an Id property.
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 devices to delete per API request in bulk mode. Default: 50, Range: 1-1000
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. Use with caution!
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.
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.Void
NOTES
AddedInVersion: v1.0.4