diff --git a/Functions/Setup/Clear-NetboxCredential.ps1 b/Functions/Setup/Clear-NetboxCredential.ps1 index 62109ab..3decf44 100644 --- a/Functions/Setup/Clear-NetboxCredential.ps1 +++ b/Functions/Setup/Clear-NetboxCredential.ps1 @@ -4,8 +4,8 @@ ( [switch]$Force ) - + if ($Force -or ($PSCmdlet.ShouldProcess('Netbox Credentials', 'Clear'))) { $script:NetboxConfig.Credential = $null } -} \ No newline at end of file +} diff --git a/NetboxPS/NetboxPS.psm1 b/NetboxPS/NetboxPS.psm1 index d429bbb..7505c90 100644 --- a/NetboxPS/NetboxPS.psm1 +++ b/NetboxPS/NetboxPS.psm1 @@ -438,7 +438,7 @@ function Clear-NetboxCredential { ( [switch]$Force ) - + if ($Force -or ($PSCmdlet.ShouldProcess('Netbox Credentials', 'Clear'))) { $script:NetboxConfig.Credential = $null }