mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-16 03:05:47 +00:00
Compare commits
38 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7129e7d3c7 | ||
|
|
bb43ac490c | ||
|
|
59a28faff5 | ||
|
|
b441e02e2b | ||
|
|
40c7aac059 | ||
|
|
e4eb42a7a3 | ||
|
|
bf01b354bd | ||
|
|
cceb8fe765 | ||
|
|
8326e3eb29 | ||
|
|
26cc2b3c0d | ||
|
|
44dcb252b8 | ||
|
|
88647882cc | ||
|
|
2233de974d | ||
|
|
9e00636fbe | ||
|
|
bb0dfc0aa4 | ||
|
|
4897d6b71f | ||
|
|
6c2d358171 | ||
|
|
383ca2b002 | ||
|
|
985f920900 | ||
|
|
a63478a8d6 | ||
|
|
080d655f8d | ||
|
|
914b245f24 | ||
|
|
58fbbeb0cd | ||
|
|
46068dcc04 | ||
|
|
5b0c2897e0 | ||
|
|
ec5f9e810f | ||
|
|
c2a3dc285b | ||
|
|
bea65f0b06 | ||
|
|
cf1bcb3691 | ||
|
|
0049ba4985 | ||
|
|
7c03023bb8 | ||
|
|
0fd989c82a | ||
|
|
d441a1ddac | ||
|
|
7caf1a1d93 | ||
|
|
eb4d0eeb3b | ||
|
|
6f4309aa04 | ||
|
|
5421febdd1 | ||
|
|
a4c1886a23 |
76 changed files with 66772 additions and 1414 deletions
12
.vscode/settings.json
vendored
12
.vscode/settings.json
vendored
|
|
@ -4,6 +4,18 @@
|
||||||
"files.trimTrailingWhitespace": true,
|
"files.trimTrailingWhitespace": true,
|
||||||
"powershell.scriptAnalysis.settingsPath": ".vscode/PSScriptAnalyzerSettings.psd1",
|
"powershell.scriptAnalysis.settingsPath": ".vscode/PSScriptAnalyzerSettings.psd1",
|
||||||
"powershell.codeFormatting.newLineAfterCloseBrace": false,
|
"powershell.codeFormatting.newLineAfterCloseBrace": false,
|
||||||
|
"powershell.codeFormatting.useCorrectCasing": true,
|
||||||
|
"powershell.codeFormatting.preset": "OTBS",
|
||||||
|
"powershell.codeFormatting.addWhitespaceAroundPipe": true,
|
||||||
|
"powershell.codeFormatting.autoCorrectAliases": true,
|
||||||
|
"powershell.codeFormatting.newLineAfterCloseBrace": true,
|
||||||
|
"powershell.codeFormatting.newLineAfterOpenBrace": true,
|
||||||
|
"powershell.codeFormatting.openBraceOnSameLine": true,
|
||||||
|
"powershell.codeFormatting.whitespaceAfterSeparator": true,
|
||||||
|
"powershell.codeFormatting.whitespaceAroundOperator": true,
|
||||||
|
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
|
||||||
|
"powershell.codeFormatting.whitespaceBeforeOpenParen": true,
|
||||||
|
"powershell.codeFormatting.trimWhitespaceAroundPipe": true,
|
||||||
"[markdown]": {
|
"[markdown]": {
|
||||||
"files.trimTrailingWhitespace": false,
|
"files.trimTrailingWhitespace": false,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,16 +23,16 @@ function Get-NetboxCircuit {
|
||||||
A raw search query... As if you were searching the web site
|
A raw search query... As if you were searching the web site
|
||||||
|
|
||||||
.PARAMETER Provider
|
.PARAMETER Provider
|
||||||
The name or ID of the provider. Provide either [string] or [int]. String will search provider names, integer will search database IDs
|
The name or ID of the provider. Provide either [string] or [uint64]. String will search provider names, integer will search database IDs
|
||||||
|
|
||||||
.PARAMETER Type
|
.PARAMETER Type
|
||||||
Type of circuit. Provide either [string] or [int]. String will search provider type names, integer will search database IDs
|
Type of circuit. Provide either [string] or [uint64]. String will search provider type names, integer will search database IDs
|
||||||
|
|
||||||
.PARAMETER Site
|
.PARAMETER Site
|
||||||
Location/site of circuit. Provide either [string] or [int]. String will search site names, integer will search database IDs
|
Location/site of circuit. Provide either [string] or [uint64]. String will search site names, integer will search database IDs
|
||||||
|
|
||||||
.PARAMETER Tenant
|
.PARAMETER Tenant
|
||||||
Tenant assigned to circuit. Provide either [string] or [int]. String will search tenant names, integer will search database IDs
|
Tenant assigned to circuit. Provide either [string] or [uint64]. String will search tenant names, integer will search database IDs
|
||||||
|
|
||||||
.PARAMETER Limit
|
.PARAMETER Limit
|
||||||
A description of the Limit parameter.
|
A description of the Limit parameter.
|
||||||
|
|
@ -57,7 +57,7 @@ function Get-NetboxCircuit {
|
||||||
param
|
param
|
||||||
(
|
(
|
||||||
[Parameter(ParameterSetName = 'ById')]
|
[Parameter(ParameterSetName = 'ById')]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$CID,
|
[string]$CID,
|
||||||
|
|
@ -66,7 +66,7 @@ function Get-NetboxCircuit {
|
||||||
[datetime]$InstallDate,
|
[datetime]$InstallDate,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$CommitRate,
|
[uint64]$CommitRate,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,17 @@ function New-NetboxCircuit {
|
||||||
[string]$CID,
|
[string]$CID,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint32]$Provider,
|
[uint64]$Provider,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint32]$Type,
|
[uint64]$Type,
|
||||||
|
|
||||||
#[ValidateSet('Active', 'Planned', 'Provisioning', 'Offline', 'Deprovisioning', 'Decommissioned ')]
|
#[ValidateSet('Active', 'Planned', 'Provisioning', 'Offline', 'Deprovisioning', 'Decommissioned ')]
|
||||||
[uint16]$Status = 'Active',
|
[uint16]$Status = 'Active',
|
||||||
|
|
||||||
[string]$Description,
|
[string]$Description,
|
||||||
|
|
||||||
[uint32]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[string]$Termination_A,
|
[string]$Termination_A,
|
||||||
|
|
||||||
|
|
@ -29,7 +29,7 @@ function New-NetboxCircuit {
|
||||||
[string]$Termination_Z,
|
[string]$Termination_Z,
|
||||||
|
|
||||||
[ValidateRange(0, 2147483647)]
|
[ValidateRange(0, 2147483647)]
|
||||||
[uint32]$Commit_Rate,
|
[uint64]$Commit_Rate,
|
||||||
|
|
||||||
[string]$Comments,
|
[string]$Comments,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ function Get-NetboxCircuitProvider {
|
||||||
(
|
(
|
||||||
[Parameter(ParameterSetName = 'ById',
|
[Parameter(ParameterSetName = 'ById',
|
||||||
Mandatory = $true)]
|
Mandatory = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query',
|
[Parameter(ParameterSetName = 'Query',
|
||||||
Mandatory = $false)]
|
Mandatory = $false)]
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ function Get-NetboxCircuitTermination {
|
||||||
(
|
(
|
||||||
[Parameter(ParameterSetName = 'ById',
|
[Parameter(ParameterSetName = 'ById',
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Circuit_ID,
|
[string]$Circuit_ID,
|
||||||
|
|
@ -14,7 +14,7 @@ function Get-NetboxCircuitTermination {
|
||||||
[string]$Term_Side,
|
[string]$Term_Side,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Port_Speed,
|
[uint64]$Port_Speed,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ function Get-NetboxCircuitType {
|
||||||
param
|
param
|
||||||
(
|
(
|
||||||
[Parameter(ParameterSetName = 'ById')]
|
[Parameter(ParameterSetName = 'ById')]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
function Get-NetboxDCIMCableTermination {
|
||||||
|
[CmdletBinding()]
|
||||||
|
#region Parameters
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
[uint16]$Offset,
|
||||||
|
|
||||||
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[uint64]$Cable,
|
||||||
|
|
||||||
|
[string]$Cable_End,
|
||||||
|
|
||||||
|
[string]$Termination_Type,
|
||||||
|
|
||||||
|
[uint64]$Termination_ID,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
#endregion Parameters
|
||||||
|
|
||||||
|
process {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'cable-terminations'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
55
Functions/DCIM/Cables/Get-NetboxDCIMCable.ps1
Normal file
55
Functions/DCIM/Cables/Get-NetboxDCIMCable.ps1
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
function Get-NetboxDCIMCable {
|
||||||
|
[CmdletBinding()]
|
||||||
|
#region Parameters
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
[uint16]$Offset,
|
||||||
|
|
||||||
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[string]$Label,
|
||||||
|
|
||||||
|
[string]$Termination_A_Type,
|
||||||
|
|
||||||
|
[uint64]$Termination_A_ID,
|
||||||
|
|
||||||
|
[string]$Termination_B_Type,
|
||||||
|
|
||||||
|
[uint64]$Termination_B_ID,
|
||||||
|
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[string]$Status,
|
||||||
|
|
||||||
|
[string]$Color,
|
||||||
|
|
||||||
|
[uint64]$Device_ID,
|
||||||
|
|
||||||
|
[string]$Device,
|
||||||
|
|
||||||
|
[uint64]$Rack_Id,
|
||||||
|
|
||||||
|
[string]$Rack,
|
||||||
|
|
||||||
|
[uint64]$Location_ID,
|
||||||
|
|
||||||
|
[string]$Location,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
#endregion Parameters
|
||||||
|
|
||||||
|
process {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'cables'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,43 +9,43 @@ function Get-NetboxDCIMDevice {
|
||||||
[uint16]$Offset,
|
[uint16]$Offset,
|
||||||
|
|
||||||
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[uint16]$Manufacturer_Id,
|
[uint64]$Manufacturer_Id,
|
||||||
|
|
||||||
[string]$Manufacturer,
|
[string]$Manufacturer,
|
||||||
|
|
||||||
[uint16]$Device_Type_Id,
|
[uint64]$Device_Type_Id,
|
||||||
|
|
||||||
[uint16]$Role_Id,
|
[uint64]$Role_Id,
|
||||||
|
|
||||||
[string]$Role,
|
[string]$Role,
|
||||||
|
|
||||||
[uint16]$Tenant_Id,
|
[uint64]$Tenant_Id,
|
||||||
|
|
||||||
[string]$Tenant,
|
[string]$Tenant,
|
||||||
|
|
||||||
[uint16]$Platform_Id,
|
[uint64]$Platform_Id,
|
||||||
|
|
||||||
[string]$Platform,
|
[string]$Platform,
|
||||||
|
|
||||||
[string]$Asset_Tag,
|
[string]$Asset_Tag,
|
||||||
|
|
||||||
[uint16]$Site_Id,
|
[uint64]$Site_Id,
|
||||||
|
|
||||||
[string]$Site,
|
[string]$Site,
|
||||||
|
|
||||||
[uint16]$Rack_Group_Id,
|
[uint64]$Rack_Group_Id,
|
||||||
|
|
||||||
[uint16]$Rack_Id,
|
[uint64]$Rack_Id,
|
||||||
|
|
||||||
[uint16]$Cluster_Id,
|
[uint64]$Cluster_Id,
|
||||||
|
|
||||||
[uint16]$Model,
|
[uint64]$Model,
|
||||||
|
|
||||||
[object]$Status,
|
[object]$Status,
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@ function Get-NetboxDCIMDevice {
|
||||||
|
|
||||||
[bool]$Has_Primary_IP,
|
[bool]$Has_Primary_IP,
|
||||||
|
|
||||||
[uint16]$Virtual_Chassis_Id,
|
[uint64]$Virtual_Chassis_Id,
|
||||||
|
|
||||||
[uint16]$Position,
|
[uint16]$Position,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ function Get-NetboxDCIMDeviceRole {
|
||||||
[uint16]$Offset,
|
[uint16]$Offset,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ById')]
|
[Parameter(ParameterSetName = 'ById')]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ function Get-NetboxDCIMDeviceType {
|
||||||
|
|
||||||
[uint16]$Limit,
|
[uint16]$Limit,
|
||||||
|
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@ function Get-NetboxDCIMDeviceType {
|
||||||
|
|
||||||
[string]$Manufacturer,
|
[string]$Manufacturer,
|
||||||
|
|
||||||
[uint16]$Manufacturer_Id,
|
[uint64]$Manufacturer_Id,
|
||||||
|
|
||||||
[string]$Model,
|
[string]$Model,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,17 +16,17 @@ function New-NetboxDCIMDevice {
|
||||||
[object]$Device_Type,
|
[object]$Device_Type,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint16]$Site,
|
[uint64]$Site,
|
||||||
|
|
||||||
[object]$Status = 'Active',
|
[object]$Status = 'Active',
|
||||||
|
|
||||||
[uint16]$Platform,
|
[uint64]$Platform,
|
||||||
|
|
||||||
[uint16]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[uint16]$Cluster,
|
[uint64]$Cluster,
|
||||||
|
|
||||||
[uint16]$Rack,
|
[uint64]$Rack,
|
||||||
|
|
||||||
[uint16]$Position,
|
[uint16]$Position,
|
||||||
|
|
||||||
|
|
@ -36,15 +36,15 @@ function New-NetboxDCIMDevice {
|
||||||
|
|
||||||
[string]$Asset_Tag,
|
[string]$Asset_Tag,
|
||||||
|
|
||||||
[uint16]$Virtual_Chassis,
|
[uint64]$Virtual_Chassis,
|
||||||
|
|
||||||
[uint16]$VC_Priority,
|
[uint64]$VC_Priority,
|
||||||
|
|
||||||
[uint16]$VC_Position,
|
[uint64]$VC_Position,
|
||||||
|
|
||||||
[uint16]$Primary_IP4,
|
[uint64]$Primary_IP4,
|
||||||
|
|
||||||
[uint16]$Primary_IP6,
|
[uint64]$Primary_IP6,
|
||||||
|
|
||||||
[string]$Comments,
|
[string]$Comments,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ function Remove-NetboxDCIMDevice {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[switch]$Force
|
[switch]$Force
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ function Set-NetboxDCIMDevice {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
|
|
@ -13,17 +13,17 @@ function Set-NetboxDCIMDevice {
|
||||||
|
|
||||||
[object]$Device_Type,
|
[object]$Device_Type,
|
||||||
|
|
||||||
[uint16]$Site,
|
[uint64]$Site,
|
||||||
|
|
||||||
[object]$Status,
|
[object]$Status,
|
||||||
|
|
||||||
[uint16]$Platform,
|
[uint64]$Platform,
|
||||||
|
|
||||||
[uint16]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[uint16]$Cluster,
|
[uint64]$Cluster,
|
||||||
|
|
||||||
[uint16]$Rack,
|
[uint64]$Rack,
|
||||||
|
|
||||||
[uint16]$Position,
|
[uint16]$Position,
|
||||||
|
|
||||||
|
|
@ -33,15 +33,15 @@ function Set-NetboxDCIMDevice {
|
||||||
|
|
||||||
[string]$Asset_Tag,
|
[string]$Asset_Tag,
|
||||||
|
|
||||||
[uint16]$Virtual_Chassis,
|
[uint64]$Virtual_Chassis,
|
||||||
|
|
||||||
[uint16]$VC_Priority,
|
[uint64]$VC_Priority,
|
||||||
|
|
||||||
[uint16]$VC_Position,
|
[uint64]$VC_Position,
|
||||||
|
|
||||||
[uint16]$Primary_IP4,
|
[uint64]$Primary_IP4,
|
||||||
|
|
||||||
[uint16]$Primary_IP6,
|
[uint64]$Primary_IP6,
|
||||||
|
|
||||||
[string]$Comments,
|
[string]$Comments,
|
||||||
|
|
||||||
|
|
|
||||||
42
Functions/DCIM/FrontPorts/Add-NetboxDCIMFrontPort.ps1
Normal file
42
Functions/DCIM/FrontPorts/Add-NetboxDCIMFrontPort.ps1
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
function Add-NetboxDCIMFrontPort {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[uint64]$Device,
|
||||||
|
|
||||||
|
[uint64]$Module,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Label,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[ValidatePattern('^[0-9a-f]{6}$')]
|
||||||
|
[string]$Color,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[uint64]$Rear_Port,
|
||||||
|
|
||||||
|
[uint64]$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
|
||||||
|
}
|
||||||
34
Functions/DCIM/FrontPorts/Get-NetboxDCIMFrontPort.ps1
Normal file
34
Functions/DCIM/FrontPorts/Get-NetboxDCIMFrontPort.ps1
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
function Get-NetboxDCIMFrontPort {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
[uint16]$Offset,
|
||||||
|
|
||||||
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64]$Id,
|
||||||
|
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Device,
|
||||||
|
|
||||||
|
[uint64]$Device_Id,
|
||||||
|
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
process {
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'front-ports'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
35
Functions/DCIM/FrontPorts/Remove-NetboxDCIMFrontPort.ps1
Normal file
35
Functions/DCIM/FrontPorts/Remove-NetboxDCIMFrontPort.ps1
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
function Remove-NetboxDCIMFrontPort {
|
||||||
|
|
||||||
|
[CmdletBinding(ConfirmImpact = 'High',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($FrontPortID in $Id) {
|
||||||
|
$CurrentPort = Get-NetboxDCIMFrontPort -Id $FrontPortID -ErrorAction Stop
|
||||||
|
|
||||||
|
if ($Force -or $pscmdlet.ShouldProcess("Name: $($CurrentPort.Name) | ID: $($CurrentPort.Id)", "Remove")) {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'front-ports', $CurrentPort.Id))
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $Segments
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Method DELETE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
60
Functions/DCIM/FrontPorts/Set-NetboxDCIMFrontPort.ps1
Normal file
60
Functions/DCIM/FrontPorts/Set-NetboxDCIMFrontPort.ps1
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
function Set-NetboxDCIMFrontPort {
|
||||||
|
[CmdletBinding(ConfirmImpact = 'Medium',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[uint16]$Device,
|
||||||
|
|
||||||
|
[uint16]$Module,
|
||||||
|
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Label,
|
||||||
|
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[ValidatePattern('^[0-9a-f]{6}$')]
|
||||||
|
[string]$Color,
|
||||||
|
|
||||||
|
[uint64]$Rear_Port,
|
||||||
|
|
||||||
|
[uint16]$Rear_Port_Position,
|
||||||
|
|
||||||
|
[string]$Description,
|
||||||
|
|
||||||
|
[bool]$Mark_Connected,
|
||||||
|
|
||||||
|
[uint64[]]$Tags,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($FrontPortID in $Id) {
|
||||||
|
$CurrentPort = Get-NetboxDCIMFrontPort -Id $FrontPortID -ErrorAction Stop
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'front-ports', $CurrentPort.Id))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id'
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $Segments
|
||||||
|
|
||||||
|
if ($Force -or $pscmdlet.ShouldProcess("Front Port ID $($CurrentPort.Id)", "Set")) {
|
||||||
|
InvokeNetboxRequest -URI $URI -Body $URIComponents.Parameters -Method PATCH
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,13 +9,13 @@ function Get-NetboxDCIMPlatform {
|
||||||
[uint16]$Offset,
|
[uint16]$Offset,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ById')]
|
[Parameter(ParameterSetName = 'ById')]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[string]$Slug,
|
[string]$Slug,
|
||||||
|
|
||||||
[uint16]$Manufacturer_Id,
|
[uint64]$Manufacturer_Id,
|
||||||
|
|
||||||
[string]$Manufacturer,
|
[string]$Manufacturer,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ function Add-NetboxDCIMInterface {
|
||||||
param
|
param
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint16]$Device,
|
[uint64]$Device,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
@ -23,7 +23,7 @@ function Add-NetboxDCIMInterface {
|
||||||
|
|
||||||
[bool]$MGMT_Only,
|
[bool]$MGMT_Only,
|
||||||
|
|
||||||
[uint16]$LAG,
|
[uint64]$LAG,
|
||||||
|
|
||||||
[string]$Description,
|
[string]$Description,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,10 @@ function Add-NetboxDCIMInterfaceConnection {
|
||||||
[object]$Connection_Status,
|
[object]$Connection_Status,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint16]$Interface_A,
|
[uint64]$Interface_A,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint16]$Interface_B
|
[uint64]$Interface_B
|
||||||
)
|
)
|
||||||
|
|
||||||
# Verify if both Interfaces exist
|
# Verify if both Interfaces exist
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
|
function Get-NetboxDCIMInterface {
|
||||||
function Get-NetboxDCIMInterface {
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
[OutputType([pscustomobject])]
|
[OutputType([pscustomobject])]
|
||||||
param
|
param
|
||||||
|
|
@ -9,9 +8,9 @@ function Get-NetboxDCIMInterface {
|
||||||
[uint16]$Offset,
|
[uint16]$Offset,
|
||||||
|
|
||||||
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16]$Id,
|
[uint64]$Id,
|
||||||
|
|
||||||
[uint16]$Name,
|
[uint64]$Name,
|
||||||
|
|
||||||
[object]$Form_Factor,
|
[object]$Form_Factor,
|
||||||
|
|
||||||
|
|
@ -23,12 +22,12 @@ function Get-NetboxDCIMInterface {
|
||||||
|
|
||||||
[string]$Device,
|
[string]$Device,
|
||||||
|
|
||||||
[uint16]$Device_Id,
|
[uint64]$Device_Id,
|
||||||
|
|
||||||
[ValidateSet('virtual', 'bridge', 'lag', '100base-tx', '1000base-t', '2.5gbase-t', '5gbase-t', '10gbase-t', '10gbase-cx4', '1000base-x-gbic', '1000base-x-sfp', '10gbase-x-sfpp', '10gbase-x-xfp', '10gbase-x-xenpak', '10gbase-x-x2', '25gbase-x-sfp28', '50gbase-x-sfp56', '40gbase-x-qsfpp', '50gbase-x-sfp28', '100gbase-x-cfp', '100gbase-x-cfp2', '200gbase-x-cfp2', '100gbase-x-cfp4', '100gbase-x-cpak', '100gbase-x-qsfp28', '200gbase-x-qsfp56', '400gbase-x-qsfpdd', '400gbase-x-osfp', '1000base-kx', '10gbase-kr', '10gbase-kx4', '25gbase-kr', '40gbase-kr4', '50gbase-kr', '100gbase-kp4', '100gbase-kr2', '100gbase-kr4', 'ieee802.11a', 'ieee802.11g', 'ieee802.11n', 'ieee802.11ac', 'ieee802.11ad', 'ieee802.11ax', 'ieee802.11ay', 'ieee802.15.1', 'other-wireless', 'gsm', 'cdma', 'lte', 'sonet-oc3', 'sonet-oc12', 'sonet-oc48', 'sonet-oc192', 'sonet-oc768', 'sonet-oc1920', 'sonet-oc3840', '1gfc-sfp', '2gfc-sfp', '4gfc-sfp', '8gfc-sfpp', '16gfc-sfpp', '32gfc-sfp28', '64gfc-qsfpp', '128gfc-qsfp28', 'infiniband-sdr', 'infiniband-ddr', 'infiniband-qdr', 'infiniband-fdr10', 'infiniband-fdr', 'infiniband-edr', 'infiniband-hdr', 'infiniband-ndr', 'infiniband-xdr', 't1', 'e1', 't3', 'e3', 'xdsl', 'docsis', 'gpon', 'xg-pon', 'xgs-pon', 'ng-pon2', 'epon', '10g-epon', 'cisco-stackwise', 'cisco-stackwise-plus', 'cisco-flexstack', 'cisco-flexstack-plus', 'cisco-stackwise-80', 'cisco-stackwise-160', 'cisco-stackwise-320', 'cisco-stackwise-480', 'juniper-vcp', 'extreme-summitstack', 'extreme-summitstack-128', 'extreme-summitstack-256', 'extreme-summitstack-512', 'other', IgnoreCase = $true)]
|
[ValidateSet('virtual', 'bridge', 'lag', '100base-tx', '1000base-t', '2.5gbase-t', '5gbase-t', '10gbase-t', '10gbase-cx4', '1000base-x-gbic', '1000base-x-sfp', '10gbase-x-sfpp', '10gbase-x-xfp', '10gbase-x-xenpak', '10gbase-x-x2', '25gbase-x-sfp28', '50gbase-x-sfp56', '40gbase-x-qsfpp', '50gbase-x-sfp28', '100gbase-x-cfp', '100gbase-x-cfp2', '200gbase-x-cfp2', '100gbase-x-cfp4', '100gbase-x-cpak', '100gbase-x-qsfp28', '200gbase-x-qsfp56', '400gbase-x-qsfpdd', '400gbase-x-osfp', '1000base-kx', '10gbase-kr', '10gbase-kx4', '25gbase-kr', '40gbase-kr4', '50gbase-kr', '100gbase-kp4', '100gbase-kr2', '100gbase-kr4', 'ieee802.11a', 'ieee802.11g', 'ieee802.11n', 'ieee802.11ac', 'ieee802.11ad', 'ieee802.11ax', 'ieee802.11ay', 'ieee802.15.1', 'other-wireless', 'gsm', 'cdma', 'lte', 'sonet-oc3', 'sonet-oc12', 'sonet-oc48', 'sonet-oc192', 'sonet-oc768', 'sonet-oc1920', 'sonet-oc3840', '1gfc-sfp', '2gfc-sfp', '4gfc-sfp', '8gfc-sfpp', '16gfc-sfpp', '32gfc-sfp28', '64gfc-qsfpp', '128gfc-qsfp28', 'infiniband-sdr', 'infiniband-ddr', 'infiniband-qdr', 'infiniband-fdr10', 'infiniband-fdr', 'infiniband-edr', 'infiniband-hdr', 'infiniband-ndr', 'infiniband-xdr', 't1', 'e1', 't3', 'e3', 'xdsl', 'docsis', 'gpon', 'xg-pon', 'xgs-pon', 'ng-pon2', 'epon', '10g-epon', 'cisco-stackwise', 'cisco-stackwise-plus', 'cisco-flexstack', 'cisco-flexstack-plus', 'cisco-stackwise-80', 'cisco-stackwise-160', 'cisco-stackwise-320', 'cisco-stackwise-480', 'juniper-vcp', 'extreme-summitstack', 'extreme-summitstack-128', 'extreme-summitstack-256', 'extreme-summitstack-512', 'other', IgnoreCase = $true)]
|
||||||
[string]$Type,
|
[string]$Type,
|
||||||
|
|
||||||
[uint16]$LAG_Id,
|
[uint64]$LAG_Id,
|
||||||
|
|
||||||
[string]$MAC_Address,
|
[string]$MAC_Address,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,13 @@ function Get-NetboxDCIMInterfaceConnection {
|
||||||
|
|
||||||
[uint16]$Offset,
|
[uint16]$Offset,
|
||||||
|
|
||||||
[uint16]$Id,
|
[uint64]$Id,
|
||||||
|
|
||||||
[object]$Connection_Status,
|
[object]$Connection_Status,
|
||||||
|
|
||||||
[uint16]$Site,
|
[uint64]$Site,
|
||||||
|
|
||||||
[uint16]$Device,
|
[uint64]$Device,
|
||||||
|
|
||||||
[switch]$Raw
|
[switch]$Raw
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
|
function Remove-NetboxDCIMInterface {
|
||||||
function Remove-NetboxDCIMInterface {
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Removes an interface
|
Removes an interface
|
||||||
|
|
@ -26,7 +25,7 @@ function Remove-NetboxDCIMInterface {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[switch]$Force
|
[switch]$Force
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ function Remove-NetboxDCIMInterfaceConnection {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[switch]$Force
|
[switch]$Force
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
|
function Set-NetboxDCIMInterface {
|
||||||
function Set-NetboxDCIMInterface {
|
|
||||||
[CmdletBinding(ConfirmImpact = 'Medium',
|
[CmdletBinding(ConfirmImpact = 'Medium',
|
||||||
SupportsShouldProcess = $true)]
|
SupportsShouldProcess = $true)]
|
||||||
[OutputType([pscustomobject])]
|
[OutputType([pscustomobject])]
|
||||||
|
|
@ -7,9 +6,9 @@ function Set-NetboxDCIMInterface {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[uint16]$Device,
|
[uint64]$Device,
|
||||||
|
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
|
|
@ -26,7 +25,7 @@ function Set-NetboxDCIMInterface {
|
||||||
|
|
||||||
[bool]$MGMT_Only,
|
[bool]$MGMT_Only,
|
||||||
|
|
||||||
[uint16]$LAG,
|
[uint64]$LAG,
|
||||||
|
|
||||||
[string]$Description,
|
[string]$Description,
|
||||||
|
|
||||||
|
|
@ -37,7 +36,9 @@ function Set-NetboxDCIMInterface {
|
||||||
[uint16]$Untagged_VLAN,
|
[uint16]$Untagged_VLAN,
|
||||||
|
|
||||||
[ValidateRange(1, 4094)]
|
[ValidateRange(1, 4094)]
|
||||||
[uint16[]]$Tagged_VLANs
|
[uint16[]]$Tagged_VLANs,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {
|
begin {
|
||||||
|
|
|
||||||
|
|
@ -35,13 +35,13 @@ function Set-NetboxDCIMInterfaceConnection {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[object]$Connection_Status,
|
[object]$Connection_Status,
|
||||||
|
|
||||||
[uint16]$Interface_A,
|
[uint64]$Interface_A,
|
||||||
|
|
||||||
[uint16]$Interface_B,
|
[uint64]$Interface_B,
|
||||||
|
|
||||||
[switch]$Force
|
[switch]$Force
|
||||||
)
|
)
|
||||||
|
|
|
||||||
48
Functions/DCIM/RearPorts/Add-NetboxDCIMRearPort.ps1
Normal file
48
Functions/DCIM/RearPorts/Add-NetboxDCIMRearPort.ps1
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
function Add-NetboxDCIMRearPort {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[uint64]$Device,
|
||||||
|
|
||||||
|
[uint64]$Module,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Label,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[ValidatePattern('^[0-9a-f]{6}$')]
|
||||||
|
[string]$Color,
|
||||||
|
|
||||||
|
[uint16]$Positions = 1,
|
||||||
|
|
||||||
|
[string]$Description,
|
||||||
|
|
||||||
|
[bool]$Mark_Connected,
|
||||||
|
|
||||||
|
[uint16[]]$Tags
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
$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
|
||||||
|
}
|
||||||
|
|
||||||
|
end {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
34
Functions/DCIM/RearPorts/Get-NetboxDCIMRearPort.ps1
Normal file
34
Functions/DCIM/RearPorts/Get-NetboxDCIMRearPort.ps1
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
function Get-NetboxDCIMRearPort {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
[uint16]$Offset,
|
||||||
|
|
||||||
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64]$Id,
|
||||||
|
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Device,
|
||||||
|
|
||||||
|
[uint64]$Device_Id,
|
||||||
|
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
process {
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'rear-ports'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
35
Functions/DCIM/RearPorts/Remove-NetboxDCIMRearPort.ps1
Normal file
35
Functions/DCIM/RearPorts/Remove-NetboxDCIMRearPort.ps1
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
function Remove-NetboxDCIMRearPort {
|
||||||
|
|
||||||
|
[CmdletBinding(ConfirmImpact = 'High',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($RearPortID in $Id) {
|
||||||
|
$CurrentPort = Get-NetboxDCIMRearPort -Id $RearPortID -ErrorAction Stop
|
||||||
|
|
||||||
|
if ($Force -or $pscmdlet.ShouldProcess("Name: $($CurrentPort.Name) | ID: $($CurrentPort.Id)", "Remove")) {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'rear-ports', $CurrentPort.Id))
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $Segments
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Method DELETE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
59
Functions/DCIM/RearPorts/Set-NetboxDCIMRearPort.ps1
Normal file
59
Functions/DCIM/RearPorts/Set-NetboxDCIMRearPort.ps1
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
|
||||||
|
function Set-NetboxDCIMRearPort {
|
||||||
|
[CmdletBinding(ConfirmImpact = 'Medium',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[uint64]$Device,
|
||||||
|
|
||||||
|
[uint64]$Module,
|
||||||
|
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Label,
|
||||||
|
|
||||||
|
[string]$Type,
|
||||||
|
|
||||||
|
[ValidatePattern('^[0-9a-f]{6}$')]
|
||||||
|
[string]$Color,
|
||||||
|
|
||||||
|
[uint16]$Positions,
|
||||||
|
|
||||||
|
[string]$Description,
|
||||||
|
|
||||||
|
[bool]$Mark_Connected,
|
||||||
|
|
||||||
|
[uint16[]]$Tags,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($RearPortID in $Id) {
|
||||||
|
$CurrentPort = Get-NetboxDCIMRearPort -Id $RearPortID -ErrorAction Stop
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'rear-ports', $CurrentPort.Id))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id'
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $Segments
|
||||||
|
|
||||||
|
if ($Force -or $pscmdlet.ShouldProcess("Rear Port ID $($CurrentPort.Id)", "Set")) {
|
||||||
|
InvokeNetboxRequest -URI $URI -Body $URIComponents.Parameters -Method PATCH
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,7 @@ function Get-NetboxDCIMSite {
|
||||||
param
|
param
|
||||||
(
|
(
|
||||||
[Parameter(ParameterSetName = 'ByID', ValueFromPipelineByPropertyName = $true)]
|
[Parameter(ParameterSetName = 'ByID', ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint32]$Id,
|
[uint64]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
@ -20,7 +20,7 @@ function Get-NetboxDCIMSite {
|
||||||
[string]$Facility,
|
[string]$Facility,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$ASN,
|
[uint64]$ASN,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[decimal]$Latitude,
|
[decimal]$Latitude,
|
||||||
|
|
@ -38,13 +38,13 @@ function Get-NetboxDCIMSite {
|
||||||
[string]$Contact_Email,
|
[string]$Contact_Email,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Tenant_Group_ID,
|
[uint64]$Tenant_Group_ID,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Tenant_Group,
|
[string]$Tenant_Group,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Tenant_ID,
|
[uint64]$Tenant_ID,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Tenant,
|
[string]$Tenant,
|
||||||
|
|
@ -53,7 +53,7 @@ function Get-NetboxDCIMSite {
|
||||||
[string]$Status,
|
[string]$Status,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Region_ID,
|
[uint64]$Region_ID,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Region,
|
[string]$Region,
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ function New-NetboxDCIMSite {
|
||||||
|
|
||||||
[string]$Facility,
|
[string]$Facility,
|
||||||
|
|
||||||
[uint32]$ASN,
|
[uint64]$ASN,
|
||||||
|
|
||||||
[decimal]$Latitude,
|
[decimal]$Latitude,
|
||||||
|
|
||||||
|
|
@ -52,13 +52,13 @@ function New-NetboxDCIMSite {
|
||||||
|
|
||||||
[string]$Contact_Email,
|
[string]$Contact_Email,
|
||||||
|
|
||||||
[int]$Tenant_Group,
|
[uint64]$Tenant_Group,
|
||||||
|
|
||||||
[int]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[string]$Status,
|
[string]$Status,
|
||||||
|
|
||||||
[uint32]$Region,
|
[uint64]$Region,
|
||||||
|
|
||||||
[string]$Description,
|
[string]$Description,
|
||||||
|
|
||||||
|
|
|
||||||
31
Functions/Extras/Tags/Get-NetboxTag.ps1
Normal file
31
Functions/Extras/Tags/Get-NetboxTag.ps1
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
function Get-NetboxTag {
|
||||||
|
[CmdletBinding()]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64]$Id,
|
||||||
|
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[string]$Slug,
|
||||||
|
|
||||||
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
[uint16]$Offset,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
process {
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('extras', 'tags'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
[string]$Address,
|
[string]$Address,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ByID')]
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
@ -25,28 +25,28 @@
|
||||||
[string]$VRF,
|
[string]$VRF,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$VRF_Id,
|
[uint64]$VRF_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Tenant,
|
[string]$Tenant,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Tenant_Id,
|
[uint64]$Tenant_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Device,
|
[string]$Device,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Device_ID,
|
[uint64]$Device_ID,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Virtual_Machine,
|
[string]$Virtual_Machine,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Virtual_Machine_Id,
|
[uint64]$Virtual_Machine_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Interface_Id,
|
[uint64]$Interface_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[object]$Status,
|
[object]$Status,
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,10 @@ function Get-NetboxIPAMAvailableIP {
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[Alias('Id')]
|
[Alias('Id')]
|
||||||
[int]$Prefix_ID,
|
[uint64]$Prefix_ID,
|
||||||
|
|
||||||
[Alias('NumberOfIPs')]
|
[Alias('NumberOfIPs')]
|
||||||
[int]$Limit,
|
[uint64]$Limit,
|
||||||
|
|
||||||
[switch]$Raw
|
[switch]$Raw
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -66,17 +66,17 @@ function New-NetboxIPAMAddress {
|
||||||
|
|
||||||
[object]$Status = 'Active',
|
[object]$Status = 'Active',
|
||||||
|
|
||||||
[int]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[int]$VRF,
|
[uint64]$VRF,
|
||||||
|
|
||||||
[object]$Role,
|
[object]$Role,
|
||||||
|
|
||||||
[int]$NAT_Inside,
|
[uint64]$NAT_Inside,
|
||||||
|
|
||||||
[hashtable]$Custom_Fields,
|
[hashtable]$Custom_Fields,
|
||||||
|
|
||||||
[int]$Interface,
|
[uint64]$Interface,
|
||||||
|
|
||||||
[string]$Description,
|
[string]$Description,
|
||||||
|
|
||||||
|
|
@ -85,7 +85,7 @@ function New-NetboxIPAMAddress {
|
||||||
[ValidateSet('dcim.interface', 'virtualization.vminterface', IgnoreCase = $true)]
|
[ValidateSet('dcim.interface', 'virtualization.vminterface', IgnoreCase = $true)]
|
||||||
[string]$Assigned_Object_Type,
|
[string]$Assigned_Object_Type,
|
||||||
|
|
||||||
[int]$Assigned_Object_Id,
|
[uint64]$Assigned_Object_Id,
|
||||||
|
|
||||||
[switch]$Raw
|
[switch]$Raw
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ function Remove-NetboxIPAMAddress {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[int[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[switch]$Force
|
[switch]$Force
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -6,26 +6,26 @@ function Set-NetboxIPAMAddress {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[int[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[string]$Address,
|
[string]$Address,
|
||||||
|
|
||||||
[string]$Status,
|
[string]$Status,
|
||||||
|
|
||||||
[int]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[int]$VRF,
|
[uint64]$VRF,
|
||||||
|
|
||||||
[object]$Role,
|
[object]$Role,
|
||||||
|
|
||||||
[int]$NAT_Inside,
|
[uint64]$NAT_Inside,
|
||||||
|
|
||||||
[hashtable]$Custom_Fields,
|
[hashtable]$Custom_Fields,
|
||||||
|
|
||||||
[ValidateSet('dcim.interface', 'virtualization.vminterface', IgnoreCase = $true)]
|
[ValidateSet('dcim.interface', 'virtualization.vminterface', IgnoreCase = $true)]
|
||||||
[string]$Assigned_Object_Type,
|
[string]$Assigned_Object_Type,
|
||||||
|
|
||||||
[uint16]$Assigned_Object_Id,
|
[uint64]$Assigned_Object_Id,
|
||||||
|
|
||||||
[string]$Description,
|
[string]$Description,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ function Get-NetboxIPAMAggregate {
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ByID')]
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Prefix,
|
[string]$Prefix,
|
||||||
|
|
@ -16,7 +16,7 @@ function Get-NetboxIPAMAggregate {
|
||||||
[object]$Family,
|
[object]$Family,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint16]$RIR_Id,
|
[uint64]$RIR_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$RIR,
|
[string]$RIR,
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ function Get-NetboxIPAMPrefix {
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ByID')]
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[object]$Family,
|
[object]$Family,
|
||||||
|
|
@ -116,25 +116,25 @@ function Get-NetboxIPAMPrefix {
|
||||||
[string]$VRF,
|
[string]$VRF,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$VRF_Id,
|
[uint64]$VRF_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Tenant,
|
[string]$Tenant,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Tenant_Id,
|
[uint64]$Tenant_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Site,
|
[string]$Site,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Site_Id,
|
[uint64]$Site_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Vlan_VId,
|
[string]$Vlan_VId,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Vlan_Id,
|
[uint64]$Vlan_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[object]$Status,
|
[object]$Status,
|
||||||
|
|
@ -143,7 +143,7 @@ function Get-NetboxIPAMPrefix {
|
||||||
[string]$Role,
|
[string]$Role,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Role_Id,
|
[uint64]$Role_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint16]$Limit,
|
[uint16]$Limit,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ function New-NetboxIPAMPrefix {
|
||||||
|
|
||||||
[object]$Status = 'Active',
|
[object]$Status = 'Active',
|
||||||
|
|
||||||
[uint16]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[object]$Role,
|
[object]$Role,
|
||||||
|
|
||||||
|
|
@ -18,11 +18,11 @@ function New-NetboxIPAMPrefix {
|
||||||
|
|
||||||
[string]$Description,
|
[string]$Description,
|
||||||
|
|
||||||
[uint16]$Site,
|
[uint64]$Site,
|
||||||
|
|
||||||
[uint16]$VRF,
|
[uint64]$VRF,
|
||||||
|
|
||||||
[uint16]$VLAN,
|
[uint64]$VLAN,
|
||||||
|
|
||||||
[hashtable]$Custom_Fields,
|
[hashtable]$Custom_Fields,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,19 +6,19 @@ function Set-NetboxIPAMPrefix {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[string]$Prefix,
|
[string]$Prefix,
|
||||||
|
|
||||||
[string]$Status,
|
[string]$Status,
|
||||||
|
|
||||||
[uint16]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[uint16]$Site,
|
[uint64]$Site,
|
||||||
|
|
||||||
[uint16]$VRF,
|
[uint64]$VRF,
|
||||||
|
|
||||||
[uint16]$VLAN,
|
[uint64]$VLAN,
|
||||||
|
|
||||||
[object]$Role,
|
[object]$Role,
|
||||||
|
|
||||||
|
|
|
||||||
73
Functions/IPAM/Range/Get-NetboxIPAMAddressRange.ps1
Normal file
73
Functions/IPAM/Range/Get-NetboxIPAMAddressRange.ps1
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
|
||||||
|
function Get-NetboxIPAMAddressRange {
|
||||||
|
[CmdletBinding(DefaultParameterSetName = 'Query')]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(ParameterSetName = 'Query',
|
||||||
|
Position = 0)]
|
||||||
|
[string]$Range,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
|
[string]$Query,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
|
[object]$Family,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
|
[string]$VRF,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
|
[uint32]$VRF_Id,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
|
[string]$Tenant,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
|
[uint32]$Tenant_Id,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
|
[object]$Status,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
|
[object]$Role,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
|
[uint16]$Offset,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
switch ($PSCmdlet.ParameterSetName) {
|
||||||
|
'ById' {
|
||||||
|
foreach ($Range_ID in $Id) {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'ip-ranges', $Range_ID))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id'
|
||||||
|
|
||||||
|
$uri = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $uri -Raw:$Raw
|
||||||
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
default {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'ip-ranges'))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
|
$uri = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $uri -Raw:$Raw
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
106
Functions/IPAM/Range/New-NetboxIPAMAddressRange.ps1
Normal file
106
Functions/IPAM/Range/New-NetboxIPAMAddressRange.ps1
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
|
||||||
|
|
||||||
|
function New-NetboxIPAMAddressRange {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Create a new IP address range to Netbox
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Create a new IP address range to Netbox with a status of Active by default. The maximum supported
|
||||||
|
size of an IP range is 2^32 - 1.
|
||||||
|
|
||||||
|
.PARAMETER Start_Address
|
||||||
|
Starting IPv4 or IPv6 address (with mask). The maximum supported size of an IP range is 2^32 - 1.
|
||||||
|
|
||||||
|
.PARAMETER End_Address
|
||||||
|
Ending IPv4 or IPv6 address (with mask). The maximum supported size of an IP range is 2^32 - 1.
|
||||||
|
|
||||||
|
.PARAMETER Status
|
||||||
|
Operational status of this range. Defaults to Active
|
||||||
|
|
||||||
|
.PARAMETER Tenant
|
||||||
|
Tenant ID
|
||||||
|
|
||||||
|
.PARAMETER VRF
|
||||||
|
VRF ID
|
||||||
|
|
||||||
|
.PARAMETER Role
|
||||||
|
Role such as backup, customer, development, etc... Defaults to nothing
|
||||||
|
|
||||||
|
.PARAMETER Custom_Fields
|
||||||
|
Custom field hash table. Will be validated by the API service
|
||||||
|
|
||||||
|
.PARAMETER Description
|
||||||
|
Description of IP address range
|
||||||
|
|
||||||
|
.PARAMETER Comments
|
||||||
|
Extra comments (markdown supported).
|
||||||
|
|
||||||
|
.PARAMETER Tags
|
||||||
|
One or more tags.
|
||||||
|
|
||||||
|
.PARAMETER Mark_Utilized
|
||||||
|
Treat as 100% utilized
|
||||||
|
|
||||||
|
.PARAMETER Raw
|
||||||
|
Return raw results from API service
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
New-NetboxIPAMAddressRange -Start_Address 192.0.2.20/24 -End_Address 192.0.2.20/24
|
||||||
|
|
||||||
|
Add new IP Address range from 192.0.2.20/24 to 192.0.2.20/24 with status active
|
||||||
|
|
||||||
|
.NOTES
|
||||||
|
https://netbox.neonet.org/static/docs/models/ipam/iprange/
|
||||||
|
#>
|
||||||
|
|
||||||
|
[CmdletBinding(ConfirmImpact = 'Low',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$Start_Address,
|
||||||
|
|
||||||
|
[Parameter(Mandatory = $true)]
|
||||||
|
[string]$End_Address,
|
||||||
|
|
||||||
|
[object]$Status = 'Active',
|
||||||
|
|
||||||
|
[uint64]$Tenant,
|
||||||
|
|
||||||
|
[uint64]$VRF,
|
||||||
|
|
||||||
|
[object]$Role,
|
||||||
|
|
||||||
|
[hashtable]$Custom_Fields,
|
||||||
|
|
||||||
|
[string]$Description,
|
||||||
|
|
||||||
|
[string]$Comments,
|
||||||
|
|
||||||
|
[object[]]$Tags,
|
||||||
|
|
||||||
|
[switch]$Mark_Utilized,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
process {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'ip-ranges'))
|
||||||
|
$Method = 'POST'
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
|
if ($PSCmdlet.ShouldProcess($Start_Address, 'Create new IP address range')) {
|
||||||
|
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
47
Functions/IPAM/Range/Remove-NetboxIPAMAddressRange.ps1
Normal file
47
Functions/IPAM/Range/Remove-NetboxIPAMAddressRange.ps1
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
|
||||||
|
function Remove-NetboxIPAMAddressRange {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Remove an IP address range from Netbox
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Removes/deletes an IP address range from Netbox by ID
|
||||||
|
|
||||||
|
.PARAMETER Id
|
||||||
|
Database ID of the IP address range object.
|
||||||
|
|
||||||
|
.PARAMETER Force
|
||||||
|
Do not confirm.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
PS C:\> Remove-NetboxIPAMAddressRange -Id 1234
|
||||||
|
|
||||||
|
.NOTES
|
||||||
|
Additional information about the function.
|
||||||
|
#>
|
||||||
|
|
||||||
|
[CmdletBinding(ConfirmImpact = 'High',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[switch]$Force
|
||||||
|
)
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($Range_Id in $Id) {
|
||||||
|
$CurrentRange = Get-NetboxIPAMAddressRange -Id $Range_Id -ErrorAction Stop
|
||||||
|
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'ip-ranges', $Range_Id))
|
||||||
|
|
||||||
|
if ($Force -or $pscmdlet.ShouldProcess($CurrentRange.start_address, "Delete")) {
|
||||||
|
$URI = BuildNewURI -Segments $Segments
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Method DELETE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
58
Functions/IPAM/Range/Set-NetboxIPAMAddressRange.ps1
Normal file
58
Functions/IPAM/Range/Set-NetboxIPAMAddressRange.ps1
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
|
||||||
|
function Set-NetboxIPAMAddressRange {
|
||||||
|
[CmdletBinding(ConfirmImpact = 'Medium',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[string]$Start_Address,
|
||||||
|
|
||||||
|
[string]$End_Address,
|
||||||
|
|
||||||
|
[object]$Status,
|
||||||
|
|
||||||
|
[uint64]$Tenant,
|
||||||
|
|
||||||
|
[uint64]$VRF,
|
||||||
|
|
||||||
|
[object]$Role,
|
||||||
|
|
||||||
|
[hashtable]$Custom_Fields,
|
||||||
|
|
||||||
|
[string]$Description,
|
||||||
|
|
||||||
|
[string]$Comments,
|
||||||
|
|
||||||
|
[object[]]$Tags,
|
||||||
|
|
||||||
|
[switch]$Mark_Utilized,
|
||||||
|
|
||||||
|
[switch]$Force,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
$Method = 'PATCH'
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($RangeID in $Id) {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('ipam', 'ip-ranges', $RangeID))
|
||||||
|
|
||||||
|
Write-Verbose "Obtaining IP range from ID $RangeID"
|
||||||
|
$CurrentRange = Get-NetboxIPAMAddressRange -Id $RangeID -ErrorAction Stop
|
||||||
|
|
||||||
|
if ($Force -or $PSCmdlet.ShouldProcess("$($CurrentRange.Start_Address) - $($CurrentRange.End_Address)", 'Set')) {
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id', 'Force'
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
|
InvokeNetboxRequest -URI $URI -Body $URIComponents.Parameters -Method $Method
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -49,7 +49,7 @@ function Get-NetboxIPAMRole {
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ByID')]
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Slug,
|
[string]$Slug,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ function Get-NetboxIPAMVLAN {
|
||||||
[uint16]$VID,
|
[uint16]$VID,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ByID')]
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
@ -21,13 +21,13 @@ function Get-NetboxIPAMVLAN {
|
||||||
[string]$Tenant,
|
[string]$Tenant,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Tenant_Id,
|
[uint64]$Tenant_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$TenantGroup,
|
[string]$TenantGroup,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$TenantGroup_Id,
|
[uint64]$TenantGroup_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[object]$Status,
|
[object]$Status,
|
||||||
|
|
@ -39,19 +39,19 @@ function Get-NetboxIPAMVLAN {
|
||||||
[string]$Site,
|
[string]$Site,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Site_Id,
|
[uint64]$Site_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Group,
|
[string]$Group,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Group_Id,
|
[uint64]$Group_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Role,
|
[string]$Role,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Role_Id,
|
[uint64]$Role_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint16]$Limit,
|
[uint16]$Limit,
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
[object]$Status = 'Active',
|
[object]$Status = 'Active',
|
||||||
|
|
||||||
[uint16]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[object]$Role,
|
[object]$Role,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,19 @@
|
||||||
|
|
||||||
function Get-NetboxAPIDefinition {
|
function Get-NetboxAPIDefinition {
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param ()
|
param
|
||||||
|
(
|
||||||
|
[ValidateSet('json', 'yaml', IgnoreCase = $true)]
|
||||||
|
[string]$Format = 'json'
|
||||||
|
)
|
||||||
|
|
||||||
#$URI = "https://netbox.neonet.org/api/docs/?format=openapi"
|
#$URI = "https://netbox.neonet.org/api/schema/?format=json"
|
||||||
|
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('docs'))
|
$Segments = [System.Collections.ArrayList]::new(@('schema'))
|
||||||
|
|
||||||
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary @{'format' = 'openapi' }
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary @{
|
||||||
|
'format' = $Format.ToLower()
|
||||||
|
}
|
||||||
|
|
||||||
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters -SkipConnectedCheck
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters -SkipConnectedCheck
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
[string]$Model,
|
[string]$Model,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ByID')]
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$App_Label,
|
[string]$App_Label,
|
||||||
|
|
|
||||||
|
|
@ -52,22 +52,22 @@ function Get-NetboxContactAssignment {
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ByID')]
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Content_Type_Id,
|
[uint64]$Content_Type_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Content_Type,
|
[string]$Content_Type,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Object_Id,
|
[uint64]$Object_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Contact_Id,
|
[uint64]$Contact_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint32]$Role_Id,
|
[uint64]$Role_Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint16]$Limit,
|
[uint16]$Limit,
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,35 @@
|
||||||
|
|
||||||
function New-NetboxContactRole {
|
function New-NetboxContactAssignment {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Create a new contact role in Netbox
|
Create a new contact role assignment in Netbox
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Creates a new contact role object in Netbox
|
Creates a new contact role assignment in Netbox
|
||||||
|
|
||||||
.PARAMETER Content_Type
|
.PARAMETER Content_Type
|
||||||
A description of the Content_Type parameter.
|
The content type for this assignment.
|
||||||
|
|
||||||
.PARAMETER Object_Id
|
.PARAMETER Object_Id
|
||||||
A description of the Object_Id parameter.
|
ID of the object to assign.
|
||||||
|
|
||||||
.PARAMETER Contact
|
.PARAMETER Contact
|
||||||
A description of the Contact parameter.
|
ID of the contact to assign.
|
||||||
|
|
||||||
.PARAMETER Role
|
.PARAMETER Role
|
||||||
A description of the Role parameter.
|
ID of the contact role to assign.
|
||||||
|
|
||||||
.PARAMETER Priority
|
.PARAMETER Priority
|
||||||
A description of the Priority parameter.
|
Piority of the contact assignment.
|
||||||
|
|
||||||
.PARAMETER Raw
|
.PARAMETER Raw
|
||||||
Return the unparsed data from the HTTP request
|
Return the unparsed data from the HTTP request
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS C:\> New-NetboxContactAssignment -Name 'Leroy Jenkins' -Email 'leroy.jenkins@example.com'
|
PS C:\> New-NetboxContactAssignment -Content_Type 'dcim.location' -Object_id 10 -Contact 15 -Role 10 -Priority 'Primary'
|
||||||
|
|
||||||
.NOTES
|
.NOTES
|
||||||
Additional information about the function.
|
Valid content types: https://docs.netbox.dev/en/stable/features/contacts/#contacts_1
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding(ConfirmImpact = 'Low',
|
[CmdletBinding(ConfirmImpact = 'Low',
|
||||||
|
|
@ -39,16 +39,17 @@ function New-NetboxContactRole {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[object]$Content_Type,
|
[ValidateSet('circuits.circuit', 'circuits.provider', 'circuits.provideraccount', 'dcim.device', 'dcim.location', 'dcim.manufacturer', 'dcim.powerpanel', 'dcim.rack', 'dcim.region', 'dcim.site', 'dcim.sitegroup', 'tenancy.tenant', 'virtualization.cluster', 'virtualization.clustergroup', 'virtualization.virtualmachine', IgnoreCase = $true)]
|
||||||
|
[string]$Content_Type,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint32]$Object_Id,
|
[uint64]$Object_Id,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint32]$Contact,
|
[uint64]$Contact,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint32]$Role,
|
[uint64]$Role,
|
||||||
|
|
||||||
[ValidateSet('primary', 'secondary', 'tertiary', 'inactive', IgnoreCase = $true)]
|
[ValidateSet('primary', 'secondary', 'tertiary', 'inactive', IgnoreCase = $true)]
|
||||||
[string]$Priority,
|
[string]$Priority,
|
||||||
|
|
@ -57,47 +58,17 @@ function New-NetboxContactRole {
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {
|
begin {
|
||||||
# https://docs.netbox.dev/en/stable/features/contacts/
|
$Method = 'POST'
|
||||||
$AllowedContentTypes = @{
|
|
||||||
10 = "circuits.circuit"
|
|
||||||
7 = "circuits.provider"
|
|
||||||
19 = "dcim.device"
|
|
||||||
25 = "dcim.location"
|
|
||||||
29 = "dcim.manufacturer"
|
|
||||||
77 = "dcim.powerpanel"
|
|
||||||
20 = "dcim.rack"
|
|
||||||
30 = "dcim.region"
|
|
||||||
18 = "dcim.site"
|
|
||||||
92 = "dcim.sitegroup"
|
|
||||||
58 = "tenancy.tenant"
|
|
||||||
63 = "virtualization.cluster"
|
|
||||||
64 = "virtualization.clustergroup"
|
|
||||||
61 = "virtualization.virtualmachine"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
process {
|
process {
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('tenancy', 'contact-assignment'))
|
$Segments = [System.Collections.ArrayList]::new(@('tenancy', 'contact-assignments'))
|
||||||
$Method = 'POST'
|
|
||||||
|
|
||||||
if ($Content_Type -is [string]) {
|
|
||||||
# Need to convert this to an integer
|
|
||||||
$Content_Type = ($AllowedContentTypes.GetEnumerator() | Where-Object {
|
|
||||||
$_.Value -eq $Content_Type
|
|
||||||
}).Key
|
|
||||||
} elseif ($Content_Type -is [int]) {
|
|
||||||
if ($Content_Type -notin $($AllowedContentTypes).Keys) {
|
|
||||||
throw "Invalid content type defined"
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw "Invalid content type defined"
|
|
||||||
}
|
|
||||||
|
|
||||||
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters
|
||||||
|
|
||||||
$URI = BuildNewURI -Segments $URIComponents.Segments
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
if ($PSCmdlet.ShouldProcess($Address, 'Create new contact assignment')) {
|
if ($PSCmdlet.ShouldProcess($Content_Type, 'Create new contact assignment')) {
|
||||||
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
|
||||||
|
|
||||||
|
function Set-NetboxContactAssignment {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Update a contact role assignment in Netbox
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Updates a contact role assignment in Netbox
|
||||||
|
|
||||||
|
.PARAMETER Content_Type
|
||||||
|
The content type for this assignment.
|
||||||
|
|
||||||
|
.PARAMETER Object_Id
|
||||||
|
ID of the object to assign.
|
||||||
|
|
||||||
|
.PARAMETER Contact
|
||||||
|
ID of the contact to assign.
|
||||||
|
|
||||||
|
.PARAMETER Role
|
||||||
|
ID of the contact role to assign.
|
||||||
|
|
||||||
|
.PARAMETER Priority
|
||||||
|
Priority of the contact assignment.
|
||||||
|
|
||||||
|
.PARAMETER Raw
|
||||||
|
Return the unparsed data from the HTTP request
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
PS C:\> Set-NetboxContactAssignment -Id 11 -Content_Type 'dcim.location' -Object_id 10 -Contact 15 -Role 10 -Priority 'Primary'
|
||||||
|
|
||||||
|
.NOTES
|
||||||
|
Valid content types: https://docs.netbox.dev/en/stable/features/contacts/#contacts_1
|
||||||
|
#>
|
||||||
|
|
||||||
|
[CmdletBinding(ConfirmImpact = 'Low',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[ValidateSet('circuits.circuit', 'circuits.provider', 'circuits.provideraccount', 'dcim.device', 'dcim.location', 'dcim.manufacturer', 'dcim.powerpanel', 'dcim.rack', 'dcim.region', 'dcim.site', 'dcim.sitegroup', 'tenancy.tenant', 'virtualization.cluster', 'virtualization.clustergroup', 'virtualization.virtualmachine', IgnoreCase = $true)]
|
||||||
|
[string]$Content_Type,
|
||||||
|
|
||||||
|
[uint64]$Object_Id,
|
||||||
|
|
||||||
|
[uint64]$Contact,
|
||||||
|
|
||||||
|
[uint64]$Role,
|
||||||
|
|
||||||
|
[ValidateSet('primary', 'secondary', 'tertiary', 'inactive', IgnoreCase = $true)]
|
||||||
|
[string]$Priority,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
$Method = 'Patch'
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($ContactAssignmentId in $Id) {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('tenancy', 'contact-assignments', $ContactAssignmentId))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id', 'Force'
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
|
$CurrentContactAssignment = Get-NetboxContactAssignment -Id $ContactAssignmentId -ErrorAction Stop
|
||||||
|
|
||||||
|
if ($PSCmdlet.ShouldProcess($CurrentContactAssignment.Id, 'Update contact assignment')) {
|
||||||
|
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ function Get-NetboxContactRole {
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ByID')]
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ function New-NetboxContactRole {
|
||||||
|
|
||||||
$URI = BuildNewURI -Segments $URIComponents.Segments
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
if ($PSCmdlet.ShouldProcess($Address, 'Create new contact')) {
|
if ($PSCmdlet.ShouldProcess($Name, 'Create new contact')) {
|
||||||
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
80
Functions/Tenancy/ContactRoles/Set-NetboxContactRole.ps1
Normal file
80
Functions/Tenancy/ContactRoles/Set-NetboxContactRole.ps1
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
|
||||||
|
function Set-NetboxContactRole {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Update a contact role in Netbox
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Updates a contact role in Netbox
|
||||||
|
|
||||||
|
.PARAMETER Name
|
||||||
|
The contact role name, e.g "Network Support"
|
||||||
|
|
||||||
|
.PARAMETER Slug
|
||||||
|
The unique URL for the role. Can only contain hypens, A-Z, a-z, 0-9, and underscores
|
||||||
|
|
||||||
|
.PARAMETER Description
|
||||||
|
Short description of the contact role
|
||||||
|
|
||||||
|
.PARAMETER Custom_Fields
|
||||||
|
A description of the Custom_Fields parameter.
|
||||||
|
|
||||||
|
.PARAMETER Raw
|
||||||
|
Return the unparsed data from the HTTP request
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
PS C:\> New-NetboxContact -Name 'Leroy Jenkins' -Email 'leroy.jenkins@example.com'
|
||||||
|
|
||||||
|
.NOTES
|
||||||
|
Additional information about the function.
|
||||||
|
#>
|
||||||
|
|
||||||
|
[CmdletBinding(ConfirmImpact = 'Low',
|
||||||
|
SupportsShouldProcess = $true)]
|
||||||
|
[OutputType([pscustomobject])]
|
||||||
|
param
|
||||||
|
(
|
||||||
|
[Parameter(Mandatory = $true,
|
||||||
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[uint64[]]$Id,
|
||||||
|
|
||||||
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
|
[ValidateLength(1, 100)]
|
||||||
|
[string]$Name,
|
||||||
|
|
||||||
|
[ValidateLength(1, 100)]
|
||||||
|
[ValidatePattern('^[-a-zA-Z0-9_]+$')]
|
||||||
|
[string]$Slug,
|
||||||
|
|
||||||
|
[ValidateLength(0, 200)]
|
||||||
|
[string]$Description,
|
||||||
|
|
||||||
|
[hashtable]$Custom_Fields,
|
||||||
|
|
||||||
|
[switch]$Raw
|
||||||
|
)
|
||||||
|
|
||||||
|
begin {
|
||||||
|
$Method = 'PATCH'
|
||||||
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
foreach ($ContactRoleId in $Id) {
|
||||||
|
$Segments = [System.Collections.ArrayList]::new(@('tenancy', 'contacts', $ContactRoleId))
|
||||||
|
|
||||||
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id', 'Force'
|
||||||
|
|
||||||
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
|
$CurrentContactRole = Get-NetboxContactRole -Id $ContactRoleId -ErrorAction Stop
|
||||||
|
|
||||||
|
if ($Force -or $PSCmdlet.ShouldProcess($CurrentContactRole.Name, 'Update contact role')) {
|
||||||
|
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -58,7 +58,7 @@ function Get-NetboxContact {
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ByID')]
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
@ -79,7 +79,7 @@ function Get-NetboxContact {
|
||||||
[string]$Group,
|
[string]$Group,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint16]$GroupID,
|
[uint64]$GroupID,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint16]$Limit,
|
[uint16]$Limit,
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ function New-NetboxContact {
|
||||||
|
|
||||||
$URI = BuildNewURI -Segments $URIComponents.Segments
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
if ($PSCmdlet.ShouldProcess($Address, 'Create new contact')) {
|
if ($PSCmdlet.ShouldProcess($Name, 'Create new contact')) {
|
||||||
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ function Set-NetboxContact {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[ValidateLength(1, 100)]
|
[ValidateLength(1, 100)]
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
@ -68,7 +68,7 @@ function Set-NetboxContact {
|
||||||
[ValidateLength(0, 254)]
|
[ValidateLength(0, 254)]
|
||||||
[string]$Email,
|
[string]$Email,
|
||||||
|
|
||||||
[uint32]$Group,
|
[uint64]$Group,
|
||||||
|
|
||||||
[ValidateLength(0, 100)]
|
[ValidateLength(0, 100)]
|
||||||
[string]$Title,
|
[string]$Title,
|
||||||
|
|
@ -106,7 +106,7 @@ function Set-NetboxContact {
|
||||||
|
|
||||||
$URI = BuildNewURI -Segments $URIComponents.Segments
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
$CurrentContact = Get-NetboxContact -Id $ContactId
|
$CurrentContact = Get-NetboxContact -Id $ContactId -ErrorAction Stop
|
||||||
|
|
||||||
if ($Force -or $PSCmdlet.ShouldProcess($CurrentContact.Name, 'Update contact')) {
|
if ($Force -or $PSCmdlet.ShouldProcess($CurrentContact.Name, 'Update contact')) {
|
||||||
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ function Get-NetboxTenant {
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'ByID')]
|
[Parameter(ParameterSetName = 'ByID')]
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
@ -64,7 +64,7 @@ function Get-NetboxTenant {
|
||||||
[string]$Group,
|
[string]$Group,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[uint16]$GroupID,
|
[uint64]$GroupID,
|
||||||
|
|
||||||
[Parameter(ParameterSetName = 'Query')]
|
[Parameter(ParameterSetName = 'Query')]
|
||||||
[hashtable]$CustomFields,
|
[hashtable]$CustomFields,
|
||||||
|
|
|
||||||
|
|
@ -91,35 +91,35 @@ function Get-NetboxVirtualMachine {
|
||||||
|
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[object]$Status,
|
[object]$Status,
|
||||||
|
|
||||||
[string]$Tenant,
|
[string]$Tenant,
|
||||||
|
|
||||||
[uint16]$Tenant_ID,
|
[uint64]$Tenant_ID,
|
||||||
|
|
||||||
[string]$Platform,
|
[string]$Platform,
|
||||||
|
|
||||||
[uint16]$Platform_ID,
|
[uint64]$Platform_ID,
|
||||||
|
|
||||||
[string]$Cluster_Group,
|
[string]$Cluster_Group,
|
||||||
|
|
||||||
[uint16]$Cluster_Group_Id,
|
[uint64]$Cluster_Group_Id,
|
||||||
|
|
||||||
[string]$Cluster_Type,
|
[string]$Cluster_Type,
|
||||||
|
|
||||||
[uint16]$Cluster_Type_Id,
|
[uint64]$Cluster_Type_Id,
|
||||||
|
|
||||||
[uint16]$Cluster_Id,
|
[uint64]$Cluster_Id,
|
||||||
|
|
||||||
[string]$Site,
|
[string]$Site,
|
||||||
|
|
||||||
[uint16]$Site_Id,
|
[uint64]$Site_Id,
|
||||||
|
|
||||||
[string]$Role,
|
[string]$Role,
|
||||||
|
|
||||||
[uint16]$Role_Id,
|
[uint64]$Role_Id,
|
||||||
|
|
||||||
[uint16]$Limit,
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,27 +9,27 @@ function New-NetboxVirtualMachine {
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint16]$Site,
|
[uint64]$Site,
|
||||||
|
|
||||||
[uint16]$Cluster,
|
[uint64]$Cluster,
|
||||||
|
|
||||||
[uint16]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[object]$Status = 'Active',
|
[object]$Status = 'Active',
|
||||||
|
|
||||||
[uint16]$Role,
|
[uint64]$Role,
|
||||||
|
|
||||||
[uint16]$Platform,
|
[uint64]$Platform,
|
||||||
|
|
||||||
[uint16]$vCPUs,
|
[uint16]$vCPUs,
|
||||||
|
|
||||||
[uint16]$Memory,
|
[uint64]$Memory,
|
||||||
|
|
||||||
[uint16]$Disk,
|
[uint64]$Disk,
|
||||||
|
|
||||||
[uint16]$Primary_IP4,
|
[uint64]$Primary_IP4,
|
||||||
|
|
||||||
[uint16]$Primary_IP6,
|
[uint64]$Primary_IP6,
|
||||||
|
|
||||||
[hashtable]$Custom_Fields,
|
[hashtable]$Custom_Fields,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ function Remove-NetboxVirtualMachine {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[switch]$Force
|
[switch]$Force
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -6,29 +6,29 @@ function Set-NetboxVirtualMachine {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16]$Id,
|
[uint64]$Id,
|
||||||
|
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[uint16]$Role,
|
[uint64]$Role,
|
||||||
|
|
||||||
[uint16]$Cluster,
|
[uint64]$Cluster,
|
||||||
|
|
||||||
[object]$Status,
|
[object]$Status,
|
||||||
|
|
||||||
[uint16]$Platform,
|
[uint64]$Platform,
|
||||||
|
|
||||||
[uint16]$Primary_IP4,
|
[uint64]$Primary_IP4,
|
||||||
|
|
||||||
[uint16]$Primary_IP6,
|
[uint64]$Primary_IP6,
|
||||||
|
|
||||||
[byte]$VCPUs,
|
[byte]$VCPUs,
|
||||||
|
|
||||||
[uint16]$Memory,
|
[uint64]$Memory,
|
||||||
|
|
||||||
[uint16]$Disk,
|
[uint64]$Disk,
|
||||||
|
|
||||||
[uint16]$Tenant,
|
[uint64]$Tenant,
|
||||||
|
|
||||||
[string]$Comments,
|
[string]$Comments,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ function Add-NetboxVirtualMachineInterface {
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[uint16]$Virtual_Machine,
|
[uint64]$Virtual_Machine,
|
||||||
|
|
||||||
[boolean]$Enabled = $true,
|
[boolean]$Enabled = $true,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ function Get-NetboxVirtualMachineInterface {
|
||||||
param
|
param
|
||||||
(
|
(
|
||||||
[Parameter(ValueFromPipeline = $true)]
|
[Parameter(ValueFromPipeline = $true)]
|
||||||
[uint16]$Id,
|
[uint64]$Id,
|
||||||
|
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
|
|
@ -58,7 +58,7 @@ function Get-NetboxVirtualMachineInterface {
|
||||||
|
|
||||||
[uint16]$MTU,
|
[uint16]$MTU,
|
||||||
|
|
||||||
[uint16]$Virtual_Machine_Id,
|
[uint64]$Virtual_Machine_Id,
|
||||||
|
|
||||||
[string]$Virtual_Machine,
|
[string]$Virtual_Machine,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ function Set-NetboxVirtualMachineInterface {
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@ function Set-NetboxVirtualMachineInterface {
|
||||||
|
|
||||||
[boolean]$Enabled,
|
[boolean]$Enabled,
|
||||||
|
|
||||||
[uint16]$Virtual_Machine,
|
[uint64]$Virtual_Machine,
|
||||||
|
|
||||||
[switch]$Force
|
[switch]$Force
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -58,19 +58,19 @@ function Get-NetboxVirtualizationCluster {
|
||||||
[Alias('q')]
|
[Alias('q')]
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
||||||
[uint16[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[string]$Group,
|
[string]$Group,
|
||||||
|
|
||||||
[uint16]$Group_Id,
|
[uint64]$Group_Id,
|
||||||
|
|
||||||
[string]$Type,
|
[string]$Type,
|
||||||
|
|
||||||
[uint16]$Type_Id,
|
[uint64]$Type_Id,
|
||||||
|
|
||||||
[string]$Site,
|
[string]$Site,
|
||||||
|
|
||||||
[uint16]$Site_Id,
|
[uint64]$Site_Id,
|
||||||
|
|
||||||
[uint16]$Limit,
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ function Get-NetboxVirtualizationClusterGroup {
|
||||||
|
|
||||||
[string]$Query,
|
[string]$Query,
|
||||||
|
|
||||||
[uint32[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[uint16]$Limit,
|
[uint16]$Limit,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# Generated by: Ben Claussen
|
# Generated by: Ben Claussen
|
||||||
#
|
#
|
||||||
# Generated on: 2023-03-13
|
# Generated on: 2023-11-09
|
||||||
#
|
#
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
RootModule = 'NetboxPS.psm1'
|
RootModule = 'NetboxPS.psm1'
|
||||||
|
|
||||||
# Version number of this module.
|
# Version number of this module.
|
||||||
ModuleVersion = '1.7.3'
|
ModuleVersion = '1.8.5'
|
||||||
|
|
||||||
# Supported PSEditions
|
# Supported PSEditions
|
||||||
# CompatiblePSEditions = @()
|
# CompatiblePSEditions = @()
|
||||||
|
|
@ -69,40 +69,49 @@ CLRVersion = '2.0.50727'
|
||||||
NestedModules = @()
|
NestedModules = @()
|
||||||
|
|
||||||
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
||||||
FunctionsToExport = 'Add-NetboxDCIMInterface', 'Add-NetboxDCIMInterfaceConnection',
|
FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
|
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
|
||||||
'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential',
|
'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential',
|
||||||
'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
||||||
'Get-NetboxCircuit', 'Get-NetboxCircuitProvider',
|
'Get-NetboxCircuit', 'Get-NetboxCircuitProvider',
|
||||||
'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType',
|
'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType',
|
||||||
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
||||||
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
||||||
'Get-NetboxCredential', 'Get-NetboxDCIMDevice',
|
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
|
||||||
|
'Get-NetboxDCIMCableTermination', 'Get-NetboxDCIMDevice',
|
||||||
'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType',
|
'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType',
|
||||||
'Get-NetboxDCIMInterface', 'Get-NetboxDCIMInterfaceConnection',
|
'Get-NetboxDCIMFrontPort', 'Get-NetboxDCIMInterface',
|
||||||
'Get-NetboxDCIMPlatform', 'Get-NetboxDCIMSite', 'Get-NetboxHostname',
|
'Get-NetboxDCIMInterfaceConnection', 'Get-NetboxDCIMPlatform',
|
||||||
|
'Get-NetboxDCIMRearPort', 'Get-NetboxDCIMSite', 'Get-NetboxHostname',
|
||||||
'Get-NetboxHostPort', 'Get-NetboxHostScheme',
|
'Get-NetboxHostPort', 'Get-NetboxHostScheme',
|
||||||
'Get-NetboxInvokeParams', 'Get-NetboxIPAMAddress',
|
'Get-NetboxInvokeParams', 'Get-NetboxIPAMAddress',
|
||||||
'Get-NetboxIPAMAggregate', 'Get-NetboxIPAMAvailableIP',
|
'Get-NetboxIPAMAddressRange', 'Get-NetboxIPAMAggregate',
|
||||||
'Get-NetboxIPAMPrefix', 'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN',
|
'Get-NetboxIPAMAvailableIP', 'Get-NetboxIPAMPrefix',
|
||||||
|
'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN', 'Get-NetboxTag',
|
||||||
'Get-NetboxTenant', 'Get-NetboxTimeout', 'Get-NetboxVersion',
|
'Get-NetboxTenant', 'Get-NetboxTimeout', 'Get-NetboxVersion',
|
||||||
'Get-NetboxVirtualizationCluster',
|
'Get-NetboxVirtualizationCluster',
|
||||||
'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine',
|
'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine',
|
||||||
'Get-NetboxVirtualMachineInterface', 'New-NetboxCircuit',
|
'Get-NetboxVirtualMachineInterface', 'New-NetboxCircuit',
|
||||||
'New-NetboxContact', 'New-NetboxContactAssignment',
|
'New-NetboxContact', 'New-NetboxContactAssignment',
|
||||||
'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite',
|
'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite',
|
||||||
'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN',
|
'New-NetboxIPAMAddress', 'New-NetboxIPAMAddressRange',
|
||||||
'New-NetboxTenant', 'New-NetboxVirtualMachine',
|
'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN', 'New-NetboxTenant',
|
||||||
'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMInterface',
|
'New-NetboxVirtualMachine', 'Remove-NetboxDCIMDevice',
|
||||||
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMSite',
|
'Remove-NetboxDCIMFrontPort', 'Remove-NetboxDCIMInterface',
|
||||||
'Remove-NetboxIPAMAddress', 'Remove-NetboxVirtualMachine',
|
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
|
||||||
'Set-NetboxCipherSSL', 'Set-NetboxContact', 'Set-NetboxCredential',
|
'Remove-NetboxDCIMSite', 'Remove-NetboxIPAMAddress',
|
||||||
'Set-NetboxDCIMDevice', 'Set-NetboxDCIMInterface',
|
'Remove-NetboxIPAMAddressRange', 'Remove-NetboxVirtualMachine',
|
||||||
'Set-NetboxDCIMInterfaceConnection', 'Set-NetboxHostName',
|
'Set-NetboxCipherSSL', 'Set-NetboxContact',
|
||||||
'Set-NetboxHostPort', 'Set-NetboxHostScheme',
|
'Set-NetboxContactAssignment', 'Set-NetboxContactRole',
|
||||||
|
'Set-NetboxCredential', 'Set-NetboxDCIMDevice',
|
||||||
|
'Set-NetboxDCIMFrontPort', 'Set-NetboxDCIMInterface',
|
||||||
|
'Set-NetboxDCIMInterfaceConnection', 'Set-NetboxDCIMRearPort',
|
||||||
|
'Set-NetboxHostName', 'Set-NetboxHostPort', 'Set-NetboxHostScheme',
|
||||||
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
||||||
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
|
'Set-NetboxIPAMAddressRange', 'Set-NetboxIPAMPrefix',
|
||||||
'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine',
|
'Set-NetboxTimeout', 'Set-NetboxUnstrustedSSL',
|
||||||
'Set-NetboxVirtualMachineInterface', 'Test-NetboxAPIConnected'
|
'Set-NetboxVirtualMachine', 'Set-NetboxVirtualMachineInterface',
|
||||||
|
'Test-NetboxAPIConnected'
|
||||||
|
|
||||||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
||||||
CmdletsToExport = '*'
|
CmdletsToExport = '*'
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,13 @@
|
||||||
<Folder>Functions\Tenancy\Tenants</Folder>
|
<Folder>Functions\Tenancy\Tenants</Folder>
|
||||||
<Folder>Functions\Tenancy\ContactRoles</Folder>
|
<Folder>Functions\Tenancy\ContactRoles</Folder>
|
||||||
<Folder>Functions\Tenancy\ContactAssignment</Folder>
|
<Folder>Functions\Tenancy\ContactAssignment</Folder>
|
||||||
|
<Folder>Functions\DCIM\Cable Terminations</Folder>
|
||||||
|
<Folder>Functions\DCIM\Cables</Folder>
|
||||||
|
<Folder>Functions\DCIM\FrontPorts</Folder>
|
||||||
|
<Folder>Functions\DCIM\RearPorts</Folder>
|
||||||
|
<Folder>Functions\Extras</Folder>
|
||||||
|
<Folder>Functions\IPAM\Range</Folder>
|
||||||
|
<Folder>Functions\Extras\Tags</Folder>
|
||||||
</Folders>
|
</Folders>
|
||||||
<Files>
|
<Files>
|
||||||
<File Build="2">NetboxPS.psd1</File>
|
<File Build="2">NetboxPS.psd1</File>
|
||||||
|
|
@ -126,10 +133,30 @@
|
||||||
<File Build="0" Shared="True" ReferenceFunction="Invoke-New-NetboxContactRole_ps1" ExportFunctions="True">Functions\Tenancy\ContactRoles\New-NetboxContactRole.ps1</File>
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-New-NetboxContactRole_ps1" ExportFunctions="True">Functions\Tenancy\ContactRoles\New-NetboxContactRole.ps1</File>
|
||||||
<File Build="0" Shared="True" ReferenceFunction="Invoke-New-NetboxTenant_ps1" ExportFunctions="True">Functions\Tenancy\Tenants\New-NetboxTenant.ps1</File>
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-New-NetboxTenant_ps1" ExportFunctions="True">Functions\Tenancy\Tenants\New-NetboxTenant.ps1</File>
|
||||||
<File Build="0" Shared="True" ReferenceFunction="Invoke-Get-NetboxContactAssignment_ps1" ExportFunctions="True">Functions\Tenancy\ContactAssignment\Get-NetboxContactAssignment.ps1</File>
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Get-NetboxContactAssignment_ps1" ExportFunctions="True">Functions\Tenancy\ContactAssignment\Get-NetboxContactAssignment.ps1</File>
|
||||||
<File Build="2" Shared="True" ReferenceFunction="Invoke-Get-NetboxContentType_ps1" ExportFunctions="False">Functions\Setup\Support\Get-NetboxContentType.ps1</File>
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Get-NetboxContentType_ps1" ExportFunctions="False">Functions\Setup\Support\Get-NetboxContentType.ps1</File>
|
||||||
<File Build="0" Shared="True" ReferenceFunction="Invoke-New-NetboxContactAssignment_ps1" ExportFunctions="True">Functions\Tenancy\ContactAssignment\New-NetboxContactAssignment.ps1</File>
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-New-NetboxContactAssignment_ps1" ExportFunctions="True">Functions\Tenancy\ContactAssignment\New-NetboxContactAssignment.ps1</File>
|
||||||
<File Build="0" Shared="False" ReferenceFunction="Invoke-Set-NetboxContact_ps1" ExportFunctions="False">Functions\Tenancy\Contacts\Set-NetboxContact.ps1</File>
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Set-NetboxContact_ps1" ExportFunctions="True">Functions\Tenancy\Contacts\Set-NetboxContact.ps1</File>
|
||||||
<File Build="2" Shared="True" ReferenceFunction="Invoke-Test-NetboxAPIConnected_ps1" ExportFunctions="False">Functions\Setup\Support\Test-NetboxAPIConnected.ps1</File>
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Test-NetboxAPIConnected_ps1" ExportFunctions="False">Functions\Setup\Support\Test-NetboxAPIConnected.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Get-NetboxDCIMCableTermination_ps1" ExportFunctions="False">Functions\DCIM\Cable Terminations\Get-NetboxDCIMCableTermination.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Get-NetboxDCIMCable_ps1" ExportFunctions="False">Functions\DCIM\Cables\Get-NetboxDCIMCable.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Add-NetboxDCIMFrontPort_ps1" ExportFunctions="False">Functions\DCIM\FrontPorts\Add-NetboxDCIMFrontPort.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Get-NetboxDCIMFrontPort_ps1" ExportFunctions="False">Functions\DCIM\FrontPorts\Get-NetboxDCIMFrontPort.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Remove-NetboxDCIMFrontPort_ps1" ExportFunctions="False">Functions\DCIM\FrontPorts\Remove-NetboxDCIMFrontPort.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Set-NetboxDCIMFrontPort_ps1" ExportFunctions="False">Functions\DCIM\FrontPorts\Set-NetboxDCIMFrontPort.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Add-NetboxDCIMRearPort_ps1" ExportFunctions="False">Functions\DCIM\RearPorts\Add-NetboxDCIMRearPort.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Get-NetboxDCIMRearPort_ps1" ExportFunctions="False">Functions\DCIM\RearPorts\Get-NetboxDCIMRearPort.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Remove-NetboxDCIMRearPort_ps1" ExportFunctions="False">Functions\DCIM\RearPorts\Remove-NetboxDCIMRearPort.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Set-NetboxDCIMRearPort_ps1" ExportFunctions="False">Functions\DCIM\RearPorts\Set-NetboxDCIMRearPort.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-New-NetboxDCIMSite_ps1" ExportFunctions="False">Functions\DCIM\Sites\New-NetboxDCIMSite.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Remove-NetboxDCIMSite_ps1" ExportFunctions="False">Functions\DCIM\Sites\Remove-NetboxDCIMSite.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Get-NetboxTag_ps1" ExportFunctions="True">Functions\Extras\Tags\Get-NetboxTag.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Clear-NetboxCredential_ps1" ExportFunctions="False">Functions\Setup\Clear-NetboxCredential.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Get-NetboxIPAMAddressRange_ps1" ExportFunctions="True">Functions\IPAM\Range\Get-NetboxIPAMAddressRange.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-New-NetboxIPAMAddressRange_ps1" ExportFunctions="True">Functions\IPAM\Range\New-NetboxIPAMAddressRange.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Remove-NetboxIPAMAddressRange_ps1" ExportFunctions="True">Functions\IPAM\Range\Remove-NetboxIPAMAddressRange.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Set-NetboxIPAMAddressRange_ps1" ExportFunctions="True">Functions\IPAM\Range\Set-NetboxIPAMAddressRange.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Set-NetboxContactRole_ps1" ExportFunctions="True">Functions\Tenancy\ContactRoles\Set-NetboxContactRole.ps1</File>
|
||||||
|
<File Build="0" Shared="True" ReferenceFunction="Invoke-Set-NetboxContactAssignment_ps1" ExportFunctions="True">Functions\Tenancy\ContactAssignment\Set-NetboxContactAssignment.ps1</File>
|
||||||
</Files>
|
</Files>
|
||||||
<StartupScript>R:\Netbox\NetboxPS\Test-Module.ps1</StartupScript>
|
<StartupScript>R:\Netbox\NetboxPS\Test-Module.ps1</StartupScript>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
# Generated by: Ben Claussen
|
# Generated by: Ben Claussen
|
||||||
#
|
#
|
||||||
# Generated on: 2023-03-13
|
# Generated on: 2023-11-09
|
||||||
#
|
#
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
RootModule = 'NetboxPS.psm1'
|
RootModule = 'NetboxPS.psm1'
|
||||||
|
|
||||||
# Version number of this module.
|
# Version number of this module.
|
||||||
ModuleVersion = '1.7.3'
|
ModuleVersion = '1.8.5'
|
||||||
|
|
||||||
# Supported PSEditions
|
# Supported PSEditions
|
||||||
# CompatiblePSEditions = @()
|
# CompatiblePSEditions = @()
|
||||||
|
|
@ -69,40 +69,49 @@ CLRVersion = '2.0.50727'
|
||||||
NestedModules = @()
|
NestedModules = @()
|
||||||
|
|
||||||
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
||||||
FunctionsToExport = 'Add-NetboxDCIMInterface', 'Add-NetboxDCIMInterfaceConnection',
|
FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
|
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
|
||||||
'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential',
|
'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential',
|
||||||
'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
||||||
'Get-NetboxCircuit', 'Get-NetboxCircuitProvider',
|
'Get-NetboxCircuit', 'Get-NetboxCircuitProvider',
|
||||||
'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType',
|
'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType',
|
||||||
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
||||||
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
||||||
'Get-NetboxCredential', 'Get-NetboxDCIMDevice',
|
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
|
||||||
|
'Get-NetboxDCIMCableTermination', 'Get-NetboxDCIMDevice',
|
||||||
'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType',
|
'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType',
|
||||||
'Get-NetboxDCIMInterface', 'Get-NetboxDCIMInterfaceConnection',
|
'Get-NetboxDCIMFrontPort', 'Get-NetboxDCIMInterface',
|
||||||
'Get-NetboxDCIMPlatform', 'Get-NetboxDCIMSite', 'Get-NetboxHostname',
|
'Get-NetboxDCIMInterfaceConnection', 'Get-NetboxDCIMPlatform',
|
||||||
|
'Get-NetboxDCIMRearPort', 'Get-NetboxDCIMSite', 'Get-NetboxHostname',
|
||||||
'Get-NetboxHostPort', 'Get-NetboxHostScheme',
|
'Get-NetboxHostPort', 'Get-NetboxHostScheme',
|
||||||
'Get-NetboxInvokeParams', 'Get-NetboxIPAMAddress',
|
'Get-NetboxInvokeParams', 'Get-NetboxIPAMAddress',
|
||||||
'Get-NetboxIPAMAggregate', 'Get-NetboxIPAMAvailableIP',
|
'Get-NetboxIPAMAddressRange', 'Get-NetboxIPAMAggregate',
|
||||||
'Get-NetboxIPAMPrefix', 'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN',
|
'Get-NetboxIPAMAvailableIP', 'Get-NetboxIPAMPrefix',
|
||||||
|
'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN', 'Get-NetboxTag',
|
||||||
'Get-NetboxTenant', 'Get-NetboxTimeout', 'Get-NetboxVersion',
|
'Get-NetboxTenant', 'Get-NetboxTimeout', 'Get-NetboxVersion',
|
||||||
'Get-NetboxVirtualizationCluster',
|
'Get-NetboxVirtualizationCluster',
|
||||||
'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine',
|
'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine',
|
||||||
'Get-NetboxVirtualMachineInterface', 'New-NetboxCircuit',
|
'Get-NetboxVirtualMachineInterface', 'New-NetboxCircuit',
|
||||||
'New-NetboxContact', 'New-NetboxContactAssignment',
|
'New-NetboxContact', 'New-NetboxContactAssignment',
|
||||||
'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite',
|
'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite',
|
||||||
'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN',
|
'New-NetboxIPAMAddress', 'New-NetboxIPAMAddressRange',
|
||||||
'New-NetboxTenant', 'New-NetboxVirtualMachine',
|
'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN', 'New-NetboxTenant',
|
||||||
'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMInterface',
|
'New-NetboxVirtualMachine', 'Remove-NetboxDCIMDevice',
|
||||||
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMSite',
|
'Remove-NetboxDCIMFrontPort', 'Remove-NetboxDCIMInterface',
|
||||||
'Remove-NetboxIPAMAddress', 'Remove-NetboxVirtualMachine',
|
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
|
||||||
'Set-NetboxCipherSSL', 'Set-NetboxContact', 'Set-NetboxCredential',
|
'Remove-NetboxDCIMSite', 'Remove-NetboxIPAMAddress',
|
||||||
'Set-NetboxDCIMDevice', 'Set-NetboxDCIMInterface',
|
'Remove-NetboxIPAMAddressRange', 'Remove-NetboxVirtualMachine',
|
||||||
'Set-NetboxDCIMInterfaceConnection', 'Set-NetboxHostName',
|
'Set-NetboxCipherSSL', 'Set-NetboxContact',
|
||||||
'Set-NetboxHostPort', 'Set-NetboxHostScheme',
|
'Set-NetboxContactAssignment', 'Set-NetboxContactRole',
|
||||||
|
'Set-NetboxCredential', 'Set-NetboxDCIMDevice',
|
||||||
|
'Set-NetboxDCIMFrontPort', 'Set-NetboxDCIMInterface',
|
||||||
|
'Set-NetboxDCIMInterfaceConnection', 'Set-NetboxDCIMRearPort',
|
||||||
|
'Set-NetboxHostName', 'Set-NetboxHostPort', 'Set-NetboxHostScheme',
|
||||||
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
||||||
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
|
'Set-NetboxIPAMAddressRange', 'Set-NetboxIPAMPrefix',
|
||||||
'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine',
|
'Set-NetboxTimeout', 'Set-NetboxUnstrustedSSL',
|
||||||
'Set-NetboxVirtualMachineInterface', 'Test-NetboxAPIConnected'
|
'Set-NetboxVirtualMachine', 'Set-NetboxVirtualMachineInterface',
|
||||||
|
'Test-NetboxAPIConnected'
|
||||||
|
|
||||||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
||||||
CmdletsToExport = '*'
|
CmdletsToExport = '*'
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue