Exporting the output in windows powershell

We have below commands to export the output in various formats.
  • ConvertTo-Html : This command converts the output to HTML file format.
  • Export-CSV : This command converts the output to CSV file format
  • Import-CSV : This command imports the objects stored in CSV file
  • ConvertTo-CSV : This command converts objects in to CSV strings
  • ConvertFrom-CSV : This command converts CSV strings into Objects.
You can export the output of command in various file formats like csv, txt, xml etc.
 
> Get-Process | Export-csv abc.csv

You can export the output in XML file using below syntax.
 
> Get-Process | Export-clixml abc.xml

To convert the output in HTML, you can use below command.
 
> dir | ConvertTo-HTML | Out-File abc.html

Web development and Automation testing

solutions delivered!!