• 1. London, UK
  • 2. New York, NY
  • 3. Sydney, Australia
  • 4. Melbourne, Australia
  • 5. Moscow, Russia
  • 6. Singapore
  • 7. Paris, France
  • 8. Chicago, IL
  • 9. Hong Kong
  • 10. Houston, TX

Tuesday, July 25, 2006

 

More about the out-html | out-ie functionality

Posted by Bharat Suneja at 8:24 PM
Just heard back from Vivek - apparently this functionality is actually provided by a couple of commandlets that he blogged about earlier - you can read it here.

Save the following code in a file called out-ie.msh in \Program Files\Microsoft Command Shell\v1.0 folder:

$ie = new-object -com InternetExplorer.Application
$ie.navigate("about:blank")
while ($ie.busy) { sleep 1 }
$ie.visible = $true
$ie.document.write("$input")
# if above line doesn't work on your system, uncomment line below
# $ie.document.IHTMLDocument2_write("$input")
$ie

Copy the code for out-html from this page on Vivek's blog and save it as out-html.ps1 in the same location.

Now try piping output to html and display it in IE - for instance:

get-storagegroup | out-html | out-ie

Labels: ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home