Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

PowerTip: Create Self-Updating Variable

Summary: Learn how to create a self-updating variable. (image)  How can I create a variable that will automatically update when I call it? (image)  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...

Use the PowerShell Debugger

Summary: Boe Prox shows how to debug scripts in Windows PowerShell. Honorary Scripting Guy and Windows PowerShell MVP, Boe Prox, here today filling in for my good friend, The Scripting Guy. This is the final part in a series of five posts about troubleshooting Windows PowerShell scripts and functions. The series includes: Over the ...

Trace Your Commands by Using Trace-Command

Summary: Boe Prox uses Trace-Command to understand commands. Honorary Scripting Guy and Windows PowerShell MVP, Boe Prox, here today filling in for my good friend, The Scripting Guy. This is the fourth part in a series of five posts about troubleshooting PowerShell scripts/functions. The series includes: Today I am talking about ...