Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
I said HEY!
[int]$Num = 2
$sb = [ScriptBlock]::Create('if ($Num -eq 2) { $Num + $Num }')
$Num = $sb.InvokeReturnAsIs()
$Num
$Num = 1
$Num = $sb.InvokeReturnAsIs()
$Num
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.