How to save output of any powershell script in pdf format using powershell?

Viewed 6026

Instead of:

Get-ChildItem -Path C:\ -Force | ConvertTo-Html -Body "<H2>C Drive Details</H2>" >> $OutFile

I want the output in pdf format not html

1 Answers

If you go to this website http://www.powertheshell.com/modules/

You can download the PDFTools module and extract the contents to your modules path and then Import-Module PDFTools, this will give you a new command Out-PTSPDF which you can pass your results to.

@JamesC is right there is no "native" way to complete this.

Related