mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-15 02:35:46 +00:00
Add Clear-NetboxCredential
- Grants ability to clear the stored credentials in `$Netboxconfig` variable
This commit is contained in:
parent
7edbae953f
commit
3e03e1e3ad
1 changed files with 11 additions and 0 deletions
11
Functions/Setup/Clear-NetboxCredential.ps1
Normal file
11
Functions/Setup/Clear-NetboxCredential.ps1
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue