mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 18:02:29 +00:00
Add Get/Set netboxInvokeParms for Get and Set Invoke Params (array)
Like -SkipCertificate, Timeout...
This commit is contained in:
parent
c8233ab572
commit
254a2798ac
2 changed files with 26 additions and 0 deletions
11
Functions/Setup/Get-NetboxInvokeParams.ps1
Normal file
11
Functions/Setup/Get-NetboxInvokeParams.ps1
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
function Get-NetboxInvokeParams {
|
||||
[CmdletBinding()]
|
||||
param ()
|
||||
|
||||
Write-Verbose "Getting Netbox InvokeParams"
|
||||
if ($null -eq $script:NetboxConfig.InvokeParams) {
|
||||
throw "Netbox Invoke Parms is not set! You may set it with Set-NetboxInvokeParams -InvokeParams ..."
|
||||
}
|
||||
|
||||
$script:NetboxConfig.InvokeParams
|
||||
}
|
||||
15
Functions/Setup/Set-NetboxInvokeParams.ps1
Normal file
15
Functions/Setup/Set-NetboxInvokeParams.ps1
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
function Set-NetboxInvokeParams {
|
||||
[CmdletBinding(ConfirmImpact = 'Low',
|
||||
SupportsShouldProcess = $true)]
|
||||
[OutputType([string])]
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[array]$InvokeParams
|
||||
)
|
||||
|
||||
if ($PSCmdlet.ShouldProcess('Netbox Invoke Params', 'Set')) {
|
||||
$script:NetboxConfig.InvokeParams = $InvokeParams
|
||||
$script:NetboxConfig.InvokeParams
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue