NetboxPS/Functions/DCIM/RearPorts/Add-NetboxDCIMRearPort.ps1

40 lines
835 B
PowerShell
Raw Normal View History

2023-03-13 13:59:54 +00:00

function Add-NetboxDCIMRearPort
{
[CmdletBinding()]
[OutputType([pscustomobject])]
param
(
[Parameter(Mandatory = $true)]
[uint16]$Device,
[uint16]$Module,
[Parameter(Mandatory = $true)]
[string]$Name,
[string]$Label,
[Parameter(Mandatory = $true)]
[string]$Type,
[string]$Color,
2023-03-13 17:14:54 +00:00
[uint16]$Positions = 1,
2023-03-13 13:59:54 +00:00
[string]$Description,
2023-03-14 10:40:28 +00:00
[bool]$Mark_Connected,
2023-03-13 17:14:54 +00:00
[uint16[]]$Tags
2023-03-13 13:59:54 +00:00
)
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'rear-ports'))
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
$URI = BuildNewURI -Segments $URIComponents.Segments
InvokeNetboxRequest -URI $URI -Body $URIComponents.Parameters -Method POST
}