Created
February 3, 2023 17:05
-
-
Save phatmandrake/0cb815ca3b3797a7b5ed5638103d5406 to your computer and use it in GitHub Desktop.
$Host.EnterNestedPrompt() - End Block Behavior
This file contains 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 f { | |
[Cmdletbinding()] | |
param([switch]$intervene) | |
begin{ | |
$abc = 123 | |
} | |
process{ | |
} | |
end{ | |
if ($intervene.IsPresent){ | |
$Host.EnterNestedPrompt() | |
} | |
Write-Host "`$abc has value '$abc'" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment