NetboxPS/Functions/Setup/Support/SetupNetboxConfigVariable.ps1

20 lines
No EOL
510 B
PowerShell

function SetupNetboxConfigVariable {
[CmdletBinding()]
param
(
[switch]$Overwrite
)
Write-Verbose "Checking for NetboxConfig hashtable"
if ((-not ($script:NetboxConfig)) -or $Overwrite) {
Write-Verbose "Creating NetboxConfig hashtable"
$script:NetboxConfig = @{
'Connected' = $false
'Choices' = @{
}
'APIDefinition' = $null
}
}
Write-Verbose "NetboxConfig hashtable already exists"
}