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

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.