Add Clear-NetboxCredential

- Grants ability to clear the stored credentials in `$Netboxconfig` variable
This commit is contained in:
Ben Claussen 2021-09-10 12:43:34 -04:00
parent 7edbae953f
commit 3e03e1e3ad

View file

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