mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-15 02:35:46 +00:00
Added Add-NetboxDCIMFrontPort function
This commit is contained in:
parent
6bd7acab49
commit
36b20f0d28
1 changed files with 44 additions and 0 deletions
44
Functions/DCIM/FrontPorts/Add-NetboxDCIMFrontPort.ps1
Normal file
44
Functions/DCIM/FrontPorts/Add-NetboxDCIMFrontPort.ps1
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
|
||||
function Add-NetboxDCIMFrontPort
|
||||
{
|
||||
[CmdletBinding()]
|
||||
[OutputType([pscustomobject])]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[uint16]$Device,
|
||||
|
||||
[uint16]$Module,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Name,
|
||||
|
||||
[string]$Label,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Type,
|
||||
|
||||
[ValidatePattern('^[0-9a-f]{6}$')]
|
||||
[string]$Color,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[uint16]$Rear_Port,
|
||||
|
||||
[uint16]$Rear_Port_Position,
|
||||
|
||||
[string]$Description,
|
||||
|
||||
[bool]$Mark_Connected,
|
||||
|
||||
[uint16[]]$Tags
|
||||
|
||||
)
|
||||
|
||||
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'front-ports'))
|
||||
|
||||
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||
|
||||
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||
|
||||
InvokeNetboxRequest -URI $URI -Body $URIComponents.Parameters -Method POST
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue