NetboxPS/Functions/Setup/Clear-NetboxCredential.ps1
Ben Claussen 3e03e1e3ad Add Clear-NetboxCredential
- Grants ability to clear the stored credentials in `$Netboxconfig` variable
2021-09-10 12:43:34 -04:00

11 lines
No EOL
298 B
PowerShell

function Clear-NetboxCredential {
[CmdletBinding(ConfirmImpact = 'Medium', SupportsShouldProcess = $true)]
param
(
[switch]$Force
)
if ($Force -or ($PSCmdlet.ShouldProcess('Netbox Credentials', 'Clear'))) {
$script:NetboxConfig.Credential = $null
}
}