mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 18:02:29 +00:00
32 lines
No EOL
747 B
PowerShell
32 lines
No EOL
747 B
PowerShell
|
|
function Add-NetboxVirtualMachineInterface {
|
|
[CmdletBinding()]
|
|
param
|
|
(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$Name,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[uint16]$Virtual_Machine,
|
|
|
|
[boolean]$Enabled = $true,
|
|
|
|
[string]$MAC_Address,
|
|
|
|
[uint16]$MTU,
|
|
|
|
[string]$Description,
|
|
|
|
[switch]$Raw
|
|
)
|
|
|
|
$Segments = [System.Collections.ArrayList]::new(@('virtualization', 'interfaces'))
|
|
|
|
$PSBoundParameters.Enabled = $Enabled
|
|
|
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters
|
|
|
|
$uri = BuildNewURI -Segments $URIComponents.Segments
|
|
|
|
InvokeNetboxRequest -URI $uri -Method POST -Body $URIComponents.Parameters
|
|
} |