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" `
-Status "Still Testing" `
-CurrentOperation "Testing File $Filename" `
-PercentComplete ($Something / $SomethingElse * 100) `
-SecondsRemaining $Timer.TotalSeconds