mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-16 19:25:47 +00:00
run deploy.ps1
This commit is contained in:
parent
7129e7d3c7
commit
b4781f264a
4 changed files with 73 additions and 75 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
function Set-NetboxContactRole {
|
function Set-NetboxContactRole {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
|
@ -28,7 +28,7 @@ function Set-NetboxContactRole {
|
||||||
.NOTES
|
.NOTES
|
||||||
Additional information about the function.
|
Additional information about the function.
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding(ConfirmImpact = 'Low',
|
[CmdletBinding(ConfirmImpact = 'Low',
|
||||||
SupportsShouldProcess = $true)]
|
SupportsShouldProcess = $true)]
|
||||||
[OutputType([pscustomobject])]
|
[OutputType([pscustomobject])]
|
||||||
|
|
@ -37,37 +37,37 @@ function Set-NetboxContactRole {
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint64[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
[ValidateLength(1, 100)]
|
[ValidateLength(1, 100)]
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[ValidateLength(1, 100)]
|
[ValidateLength(1, 100)]
|
||||||
[ValidatePattern('^[-a-zA-Z0-9_]+$')]
|
[ValidatePattern('^[-a-zA-Z0-9_]+$')]
|
||||||
[string]$Slug,
|
[string]$Slug,
|
||||||
|
|
||||||
[ValidateLength(0, 200)]
|
[ValidateLength(0, 200)]
|
||||||
[string]$Description,
|
[string]$Description,
|
||||||
|
|
||||||
[hashtable]$Custom_Fields,
|
[hashtable]$Custom_Fields,
|
||||||
|
|
||||||
[switch]$Raw
|
[switch]$Raw
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {
|
begin {
|
||||||
$Method = 'PATCH'
|
$Method = 'PATCH'
|
||||||
}
|
}
|
||||||
|
|
||||||
process {
|
process {
|
||||||
foreach ($ContactRoleId in $Id) {
|
foreach ($ContactRoleId in $Id) {
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('tenancy', 'contacts', $ContactRoleId))
|
$Segments = [System.Collections.ArrayList]::new(@('tenancy', 'contacts', $ContactRoleId))
|
||||||
|
|
||||||
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id', 'Force'
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id', 'Force'
|
||||||
|
|
||||||
$URI = BuildNewURI -Segments $URIComponents.Segments
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
$CurrentContactRole = Get-NetboxContactRole -Id $ContactRoleId -ErrorAction Stop
|
$CurrentContactRole = Get-NetboxContactRole -Id $ContactRoleId -ErrorAction Stop
|
||||||
|
|
||||||
if ($Force -or $PSCmdlet.ShouldProcess($CurrentContactRole.Name, 'Update contact role')) {
|
if ($Force -or $PSCmdlet.ShouldProcess($CurrentContactRole.Name, 'Update contact role')) {
|
||||||
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#
|
#
|
||||||
# Module manifest for module 'NetboxPS'
|
# Module manifest for module 'PSGet_NetboxPS'
|
||||||
#
|
#
|
||||||
# Generated by: Ben Claussen
|
# Generated by: Ben Claussen
|
||||||
#
|
#
|
||||||
# Generated on: 2023-11-09
|
# Generated on: 31/08/2024
|
||||||
#
|
#
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
@ -66,15 +66,18 @@ CLRVersion = '2.0.50727'
|
||||||
# FormatsToProcess = @()
|
# FormatsToProcess = @()
|
||||||
|
|
||||||
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
||||||
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-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
|
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
|
||||||
'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential',
|
'Add-NetboxVirtualMachineInterface', 'BuildNewURI',
|
||||||
'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
'BuildURIComponents', 'CheckNetboxIsConnected',
|
||||||
'Get-NetboxCircuit', 'Get-NetboxCircuitProvider',
|
'Clear-NetboxCredential', 'Connect-NetboxAPI', 'CreateEnum',
|
||||||
'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType',
|
'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
||||||
|
'GetNetboxAPIErrorBody', 'Get-NetboxCircuit',
|
||||||
|
'Get-NetboxCircuitProvider', 'Get-NetboxCircuitTermination',
|
||||||
|
'Get-NetboxCircuitType', 'GetNetboxConfigVariable',
|
||||||
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
||||||
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
||||||
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
|
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
|
||||||
|
|
@ -91,13 +94,14 @@ FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
'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', 'InvokeNetboxRequest',
|
||||||
'New-NetboxContact', 'New-NetboxContactAssignment',
|
'New-NetboxCircuit', 'New-NetboxContact',
|
||||||
'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite',
|
'New-NetboxContactAssignment', 'New-NetboxContactRole',
|
||||||
'New-NetboxIPAMAddress', 'New-NetboxIPAMAddressRange',
|
'New-NetboxDCIMDevice', 'New-NetboxDCIMSite', 'New-NetboxIPAMAddress',
|
||||||
'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN', 'New-NetboxTenant',
|
'New-NetboxIPAMAddressRange', 'New-NetboxIPAMPrefix',
|
||||||
'New-NetboxVirtualMachine', 'Remove-NetboxDCIMDevice',
|
'New-NetboxIPAMVLAN', 'New-NetboxTenant', 'New-NetboxVirtualMachine',
|
||||||
'Remove-NetboxDCIMFrontPort', 'Remove-NetboxDCIMInterface',
|
'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMFrontPort',
|
||||||
|
'Remove-NetboxDCIMInterface',
|
||||||
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
|
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
|
||||||
'Remove-NetboxDCIMSite', 'Remove-NetboxIPAMAddress',
|
'Remove-NetboxDCIMSite', 'Remove-NetboxIPAMAddress',
|
||||||
'Remove-NetboxIPAMAddressRange', 'Remove-NetboxVirtualMachine',
|
'Remove-NetboxIPAMAddressRange', 'Remove-NetboxVirtualMachine',
|
||||||
|
|
@ -111,16 +115,17 @@ FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
'Set-NetboxIPAMAddressRange', 'Set-NetboxIPAMPrefix',
|
'Set-NetboxIPAMAddressRange', 'Set-NetboxIPAMPrefix',
|
||||||
'Set-NetboxTimeout', 'Set-NetboxUnstrustedSSL',
|
'Set-NetboxTimeout', 'Set-NetboxUnstrustedSSL',
|
||||||
'Set-NetboxVirtualMachine', 'Set-NetboxVirtualMachineInterface',
|
'Set-NetboxVirtualMachine', 'Set-NetboxVirtualMachineInterface',
|
||||||
'Test-NetboxAPIConnected'
|
'SetupNetboxConfigVariable', 'Test-NetboxAPIConnected',
|
||||||
|
'ThrowNetboxRESTError', 'VerifyAPIConnectivity'
|
||||||
|
|
||||||
# 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 = @()
|
||||||
|
|
||||||
# Variables to export from this module
|
# Variables to export from this module
|
||||||
VariablesToExport = '*'
|
# VariablesToExport = @()
|
||||||
|
|
||||||
# Aliases 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 aliases to export.
|
# Aliases 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 aliases to export.
|
||||||
AliasesToExport = '*'
|
AliasesToExport = @()
|
||||||
|
|
||||||
# DSC resources to export from this module
|
# DSC resources to export from this module
|
||||||
# DscResourcesToExport = @()
|
# DscResourcesToExport = @()
|
||||||
|
|
@ -151,14 +156,8 @@ PrivateData = @{
|
||||||
# ReleaseNotes of this module
|
# ReleaseNotes of this module
|
||||||
# ReleaseNotes = ''
|
# ReleaseNotes = ''
|
||||||
|
|
||||||
# Prerelease string of this module
|
|
||||||
# Prerelease = ''
|
|
||||||
|
|
||||||
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
|
|
||||||
# RequireLicenseAcceptance = $false
|
|
||||||
|
|
||||||
# External dependent modules of this module
|
# External dependent modules of this module
|
||||||
# ExternalModuleDependencies = @()
|
# ExternalModuleDependencies = ''
|
||||||
|
|
||||||
} # End of PSData hashtable
|
} # End of PSData hashtable
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#
|
#
|
||||||
# Module manifest for module 'NetboxPS'
|
# Module manifest for module 'PSGet_NetboxPS'
|
||||||
#
|
#
|
||||||
# Generated by: Ben Claussen
|
# Generated by: Ben Claussen
|
||||||
#
|
#
|
||||||
# Generated on: 2023-11-09
|
# Generated on: 31/08/2024
|
||||||
#
|
#
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
@ -66,15 +66,18 @@ CLRVersion = '2.0.50727'
|
||||||
# FormatsToProcess = @()
|
# FormatsToProcess = @()
|
||||||
|
|
||||||
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
||||||
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-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
|
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
|
||||||
'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential',
|
'Add-NetboxVirtualMachineInterface', 'BuildNewURI',
|
||||||
'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
'BuildURIComponents', 'CheckNetboxIsConnected',
|
||||||
'Get-NetboxCircuit', 'Get-NetboxCircuitProvider',
|
'Clear-NetboxCredential', 'Connect-NetboxAPI', 'CreateEnum',
|
||||||
'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType',
|
'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
||||||
|
'GetNetboxAPIErrorBody', 'Get-NetboxCircuit',
|
||||||
|
'Get-NetboxCircuitProvider', 'Get-NetboxCircuitTermination',
|
||||||
|
'Get-NetboxCircuitType', 'GetNetboxConfigVariable',
|
||||||
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
||||||
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
||||||
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
|
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
|
||||||
|
|
@ -91,13 +94,14 @@ FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
'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', 'InvokeNetboxRequest',
|
||||||
'New-NetboxContact', 'New-NetboxContactAssignment',
|
'New-NetboxCircuit', 'New-NetboxContact',
|
||||||
'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite',
|
'New-NetboxContactAssignment', 'New-NetboxContactRole',
|
||||||
'New-NetboxIPAMAddress', 'New-NetboxIPAMAddressRange',
|
'New-NetboxDCIMDevice', 'New-NetboxDCIMSite', 'New-NetboxIPAMAddress',
|
||||||
'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN', 'New-NetboxTenant',
|
'New-NetboxIPAMAddressRange', 'New-NetboxIPAMPrefix',
|
||||||
'New-NetboxVirtualMachine', 'Remove-NetboxDCIMDevice',
|
'New-NetboxIPAMVLAN', 'New-NetboxTenant', 'New-NetboxVirtualMachine',
|
||||||
'Remove-NetboxDCIMFrontPort', 'Remove-NetboxDCIMInterface',
|
'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMFrontPort',
|
||||||
|
'Remove-NetboxDCIMInterface',
|
||||||
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
|
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
|
||||||
'Remove-NetboxDCIMSite', 'Remove-NetboxIPAMAddress',
|
'Remove-NetboxDCIMSite', 'Remove-NetboxIPAMAddress',
|
||||||
'Remove-NetboxIPAMAddressRange', 'Remove-NetboxVirtualMachine',
|
'Remove-NetboxIPAMAddressRange', 'Remove-NetboxVirtualMachine',
|
||||||
|
|
@ -111,16 +115,17 @@ FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
'Set-NetboxIPAMAddressRange', 'Set-NetboxIPAMPrefix',
|
'Set-NetboxIPAMAddressRange', 'Set-NetboxIPAMPrefix',
|
||||||
'Set-NetboxTimeout', 'Set-NetboxUnstrustedSSL',
|
'Set-NetboxTimeout', 'Set-NetboxUnstrustedSSL',
|
||||||
'Set-NetboxVirtualMachine', 'Set-NetboxVirtualMachineInterface',
|
'Set-NetboxVirtualMachine', 'Set-NetboxVirtualMachineInterface',
|
||||||
'Test-NetboxAPIConnected'
|
'SetupNetboxConfigVariable', 'Test-NetboxAPIConnected',
|
||||||
|
'ThrowNetboxRESTError', 'VerifyAPIConnectivity'
|
||||||
|
|
||||||
# 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 = @()
|
||||||
|
|
||||||
# Variables to export from this module
|
# Variables to export from this module
|
||||||
VariablesToExport = '*'
|
# VariablesToExport = @()
|
||||||
|
|
||||||
# Aliases 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 aliases to export.
|
# Aliases 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 aliases to export.
|
||||||
AliasesToExport = '*'
|
AliasesToExport = @()
|
||||||
|
|
||||||
# DSC resources to export from this module
|
# DSC resources to export from this module
|
||||||
# DscResourcesToExport = @()
|
# DscResourcesToExport = @()
|
||||||
|
|
@ -151,14 +156,8 @@ PrivateData = @{
|
||||||
# ReleaseNotes of this module
|
# ReleaseNotes of this module
|
||||||
# ReleaseNotes = ''
|
# ReleaseNotes = ''
|
||||||
|
|
||||||
# Prerelease string of this module
|
|
||||||
# Prerelease = ''
|
|
||||||
|
|
||||||
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
|
|
||||||
# RequireLicenseAcceptance = $false
|
|
||||||
|
|
||||||
# External dependent modules of this module
|
# External dependent modules of this module
|
||||||
# ExternalModuleDependencies = @()
|
# ExternalModuleDependencies = ''
|
||||||
|
|
||||||
} # End of PSData hashtable
|
} # End of PSData hashtable
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5294,7 +5294,7 @@ function Set-NetboxContactRole {
|
||||||
.NOTES
|
.NOTES
|
||||||
Additional information about the function.
|
Additional information about the function.
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding(ConfirmImpact = 'Low',
|
[CmdletBinding(ConfirmImpact = 'Low',
|
||||||
SupportsShouldProcess = $true)]
|
SupportsShouldProcess = $true)]
|
||||||
[OutputType([pscustomobject])]
|
[OutputType([pscustomobject])]
|
||||||
|
|
@ -5303,37 +5303,37 @@ function Set-NetboxContactRole {
|
||||||
[Parameter(Mandatory = $true,
|
[Parameter(Mandatory = $true,
|
||||||
ValueFromPipelineByPropertyName = $true)]
|
ValueFromPipelineByPropertyName = $true)]
|
||||||
[uint64[]]$Id,
|
[uint64[]]$Id,
|
||||||
|
|
||||||
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||||
[ValidateLength(1, 100)]
|
[ValidateLength(1, 100)]
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
|
|
||||||
[ValidateLength(1, 100)]
|
[ValidateLength(1, 100)]
|
||||||
[ValidatePattern('^[-a-zA-Z0-9_]+$')]
|
[ValidatePattern('^[-a-zA-Z0-9_]+$')]
|
||||||
[string]$Slug,
|
[string]$Slug,
|
||||||
|
|
||||||
[ValidateLength(0, 200)]
|
[ValidateLength(0, 200)]
|
||||||
[string]$Description,
|
[string]$Description,
|
||||||
|
|
||||||
[hashtable]$Custom_Fields,
|
[hashtable]$Custom_Fields,
|
||||||
|
|
||||||
[switch]$Raw
|
[switch]$Raw
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {
|
begin {
|
||||||
$Method = 'PATCH'
|
$Method = 'PATCH'
|
||||||
}
|
}
|
||||||
|
|
||||||
process {
|
process {
|
||||||
foreach ($ContactRoleId in $Id) {
|
foreach ($ContactRoleId in $Id) {
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('tenancy', 'contacts', $ContactRoleId))
|
$Segments = [System.Collections.ArrayList]::new(@('tenancy', 'contacts', $ContactRoleId))
|
||||||
|
|
||||||
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id', 'Force'
|
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id', 'Force'
|
||||||
|
|
||||||
$URI = BuildNewURI -Segments $URIComponents.Segments
|
$URI = BuildNewURI -Segments $URIComponents.Segments
|
||||||
|
|
||||||
$CurrentContactRole = Get-NetboxContactRole -Id $ContactRoleId -ErrorAction Stop
|
$CurrentContactRole = Get-NetboxContactRole -Id $ContactRoleId -ErrorAction Stop
|
||||||
|
|
||||||
if ($Force -or $PSCmdlet.ShouldProcess($CurrentContactRole.Name, 'Update contact role')) {
|
if ($Force -or $PSCmdlet.ShouldProcess($CurrentContactRole.Name, 'Update contact role')) {
|
||||||
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters -Raw:$Raw
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue