Skip to content

Instantly share code, notes, and snippets.

@kilasuit
Created September 25, 2020 16:27
Show Gist options
  • Save kilasuit/621d4249e6fd3b7b75b54d9b412dab1c to your computer and use it in GitHub Desktop.
Save kilasuit/621d4249e6fd3b7b75b54d9b412dab1c to your computer and use it in GitHub Desktop.
PSReadline no keys/secrets/tokens
Set-PSReadLineOption -AddToHistoryHandler {
param([string]$line)
$sensitive = "password|asplaintext|token|key|secret"
return ($line -notmatch $sensitive)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment