PowerShell Team

Automating the world one-liner at a time…

How to copy colorized script from PowerShell ISE

UPDATED Feb-03-2009: Lee Holmes has posted an updated version of the script which does a much better job of HTML copy-pasting. It can also produce line numbers and has a number of other improvements.   In the previous article we demonstrated how to use Console-Copy script to make a colorized copy of console screen and place it in the ...

Please Give Us Feedback

With the release of Win7/WS08R2 beta, we are officially in the end game of PowerShell V2.  This is the phase were we can only respond to customer feedback and we rely upon customer feedback to tell us whether and when we are ready to ship.  In other words - now is when we need to hear from you the most. ...

V2 Blog Entries

In a recent comment Peter asked if we could mark blog entries that relate to v2.  We are already doing that with TAGs.  If you look at the bottom of an entry, it will say FILED UNDER and then a set of tags.  We are marking blog entries with things like:  CTP3 and PowerShell V2. Experiment!  Enjoy!  Engage! ...

Copy console screen to system clipboard

In the previous example we learned how to create a colorized copy of console in HTML and RTF format. However, the output of these scripts cannot be readily used for pasting into web or word processing applications. To insert it into your article in MS Word format, you need several steps: generate RTF string, save it to an RTF file, then open ...

Colorized capture of console screen in HTML and RTF.

In the previous post we demonstrated how we can use console host API to capture screen buffer contents as text. But what if we want some colors. Would not it be nice to publish colorized copy of console in HTML or insert it as part of Microsoft Word document. For this to work we need to add some modifications to original script. Colors of each...

Finding a URL For File Transfer Cmdlets

I just posted a blog about our new File Transfer Cmdlets in which I artfully dodged a difficult question:  How do you get the URL to do the file transfer?  Sometimes you are going to have it but other times you’ll go to a website and it can be bloody impossible to find the URL that you need to download.  That was the case with...

Transferring (Large) Files Using BITs

Have you had a file copy fail?  Does that drive you crazy or what?  How about when it is a REALLY big file and it takes a couple of hours and JUUUUUST before it finishes something happens to interrupt the transfer and you have to start all over again.  Does that make you want to shove a sharpened #2 pencil up your nose or what? ...

Test-PSCmdlet

Everyone needs to get good with Advanced Functions – this is the easiest path to the best semantics for everyone.  In previous posts we’ve shown how you can add a few simple attributes and get a TON of stuff for free.  There is a LOT more to advanced functions.  You can go VERY VERY far with advanced functions.  I can...

Capture console screen

Seeing nicely formatted console examples in a previous post has inspired me to write a script that captures the console screen buffer directly from the Windows PowerShell console host. With this script you can make console "screen shots" to demonstrate some of your favorite Windows PowerShell concepts, and then post them to your...

PowerShell as Inventory Tool

Check out Don Jones’ TechNet article Windows Powershell Best Inventory Tool Ever!  He as a streaming video demo at that location as well.  Cool stuff.  I really enjoy the way Don explains things.  It is well worth a view and worth recommending to your friends that are learning PowerShell. Cheers! Jeffrey Snover [MSFT...