I use Powershell for standardised scripts across the server inventory such as running a job collection, security audit or performance statistics collection. Powershell to HTML is another option of displaying data and distrinuting to users.

Normally, I either save out the results in an Excel spreadsheet or a text file. I save out in an Excel spreadsheet if some data manipulation is required or a text file if it’s a notification .

An example of using Excel as the output device is a sql server security audit – the server owner will receive an Excel spreadsheet of all users on the database server.

Powershell to HTML file allows the benefits of a web based reporting system. Other benefits include HTML formatting.

The ConvertTo-Html Cmdlet does the job.

This Powershell script : a) creates an output device called “computer_info_<current_iso_date>.html” in the current path

An even easier way is to specify a CSS file using the CSSURI parameter. Other suggestions are to use Join-Path to construct a filename and path. Much better than trying to concatenate. And by default ConvertTo-HTML takes all object properties, so if you don't want that, pipe to Select-Object first: