Multiple tables

ConvertTo-Html may be used to build more complex documents by using the Fragment parameter. The Fragment parameter generates an HTML table only (instead of a full document). Tables may be combined to create a larger document:

# Create the body 
$body = '<h1>Services</h1>' 
$body += Get-Service | 
    Where-Object Status -eq 'Running' | 
ConvertTo-Html -Property Name, DisplayName -Fragment 
$body += '<h1>Processes</h1>' 
$body +=  Get-Process | 
    Where-Object WorkingSet -gt 50MB | 
ConvertTo-Html -Property Name, Id, WorkingSet-Fragment 
# Create a document with the merged body 
ConvertTo-Html -Body $body -Title Report | 
    Out-File report.html 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.137.38