Skip to content

Instantly share code, notes, and snippets.

@danstuken
Created October 31, 2011 18:47
Show Gist options
  • Save danstuken/1328431 to your computer and use it in GitHub Desktop.
Save danstuken/1328431 to your computer and use it in GitHub Desktop.
Powershell Variables that Re-evaluate
PS C:\Program Files\Console2> $global:fred = Set-PSBreakpoint -Variable fred -Mode read -Action { $global:fred = Get-Date }
PS C:\Program Files\Console2> $fred
31 October 2011 18:42:59
PS C:\Program Files\Console2> $fred
31 October 2011 18:43:01
PS C:\Program Files\Console2>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment