diff --git a/Functions/Setup/Get-NetboxInvokeParams.ps1 b/Functions/Setup/Get-NetboxInvokeParams.ps1 new file mode 100644 index 0000000..0cd33c7 --- /dev/null +++ b/Functions/Setup/Get-NetboxInvokeParams.ps1 @@ -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 +} \ No newline at end of file diff --git a/Functions/Setup/Set-NetboxInvokeParams.ps1 b/Functions/Setup/Set-NetboxInvokeParams.ps1 new file mode 100644 index 0000000..ca5dbf5 --- /dev/null +++ b/Functions/Setup/Set-NetboxInvokeParams.ps1 @@ -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 + } +} \ No newline at end of file