ps/Modules/Cole.PowerShell.Developer/Public/Clear-LocalUserCredentials.ps1

10 lines
389 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
function Clear-LocalUserCredentials {
<#
.SYNOPSIS
Used to clear local user credentials
Even tho they are stored in a secure string, best to wipe them sometimes
#>
Remove-EnvironmentVariable -Name "CREDENTIAL_USERNAME" -Store User
Remove-EnvironmentVariable -Name "CREDENTIAL_LASTCHANGED" -Store User
Remove-EnvironmentVariable -Name "CREDENTIAL_PASSWORD" -Store User
}