


#add the computer name as the table caption $html = $drives | ConvertTo-Html -Fragment #convert drive objects to HTML but as an XML document If using a header the title must be inserted here.įont-family: 'Courier New', Courier, monospace īackground-image: -mso-linear-gradient(left, #0A802D " -f ( $item. Write-Verbose "Starting $ ( $MyInvocation. $Path = " $ env:temp\utilization.htm " , Throw "Can't verify part of the file path $_ "

$ReportTitle = "Drive Utilization Report " , You can verify results with a command like Get-Volume." -logopath c:\scripts\logo.pngĬreate a report for the specified servers and insert pre- and post-content. PS C:\> New-HTMLDiskReport -Path c:\work\report.htm -Computername SRV1,SRV2,SRV3 -Precontent "Company Confidential" -PostContent "This report is offered as-is. The report will be saved to c:\work\diskreport.htm PS C:\> get-content c:\work\computers.txt | New-HTMLDiskReport -path c:\work\diskreport.htmĬreate a single report for every computer listed in computers.txt. Directory: C:\Users\Jeff\AppData\Local\TempĬreate a report for the local host using default settings.
