Dec 212010

Sometimes your PowerShell code can start to fly off the right side of the screen, especially when you are using commands like write-progress. To space your code down, make it more tidy, and get it to fit on one screen just use the (backtick) key. That’s the ~ (Tilde) key without the shift!

Write-Progress -Activity "Testing New Lines" <code>
-Status "Still Testing" </code>
-CurrentOperation "Testing File $Filename" <code>
-PercentComplete ($Something / $SomethingElse * 100) </code>
-SecondsRemaining $Timer.TotalSeconds