Created
September 5, 2025 21:30
-
-
Save StartAutomating/1f6385cf540f1260db63e9f5c5f6fb52 to your computer and use it in GitHub Desktop.
Gist tiny handlebars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handlebars { | |
$input -replace '\{\{(?<m>.+?)\}\}', { | |
$m = $_.Groups['m'].Value | |
if ($m -match '(?>Key|Token|Password)$') { return '' } | |
return $ExecutionContext.SessionState.PSVariable.Get($m).Value | |
} | |
} | |
'{{pid}}' | handlebars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment