mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-15 02:35:46 +00:00
30 lines
No EOL
710 B
PowerShell
30 lines
No EOL
710 B
PowerShell
|
|
function Add-NetboxVirtualMachineDisk {
|
|
[CmdletBinding()]
|
|
param
|
|
(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$Name,
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[uint64]$Virtual_Machine,
|
|
|
|
[string]$MAC_Address,
|
|
|
|
[uint64]$Size,
|
|
|
|
[string]$Description,
|
|
|
|
[switch]$Raw
|
|
)
|
|
|
|
$Segments = [System.Collections.ArrayList]::new(@('virtualization', 'virtual-disks'))
|
|
|
|
$PSBoundParameters.Enabled = $Enabled
|
|
|
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters
|
|
|
|
$uri = BuildNewURI -Segments $URIComponents.Segments
|
|
|
|
InvokeNetboxRequest -URI $uri -Method POST -Body $URIComponents.Parameters
|
|
} |