Scripting Blog

A place to learn about PowerShell and share stories of automation

PowerTip: Create Self-Updating Variable

Summary: Learn how to create a self-updating variable.  How can I create a variable that will automatically update when I call it?  Use Set-PSBreakPoint to set a variable that will always have the current date and time (or only time): Set-PSBreakpoint -Variable Time -Mode Read -Action {$Global:Time=(Get-Date)....

Feedback usabilla icon