$html =" Report " $html+= Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object Description, OSArchitecture, InstallDate, Version | ConvertTo-Html -Fragment -As List -PreContent "

OS-Info

" $html+= Get-Package | Select-Object Name, Version, Status | Sort-Object Name | ConvertTo-Html -Fragment -PreContent "

Installed-Software

" $html+= Get-Hotfix | Select-Object HotFixID, Description, InstalledOn, InstalledBy, @{Label = "Caption"; Expression = {"$($_.Caption)"}} | Sort-Object HotFixID | ConvertTo-Html -Fragment -PreContent "

Installed-Updates

" $html+= Get-WindowsPackage -Online | Where-Object PackageState -eq "Installed" | Select-Object PackageName, ReleaseType, InstallTime | Sort-Object ReleaseType | ConvertTo-Html -Fragment -PreContent "

Installed-WindowsPackages

" $html+= Get-AppxPackage | Select-Object Name, Version, Architecture, PublisherId, Status | Sort-Object Name | ConvertTo-Html -Fragment -PreContent "

Installed-AppxPackages

" $html+= "" Add-Type -AssemblyName System.Web [System.Web.HttpUtility]::HtmlDecode($html) | Out-File c:\temp\sysreport.htm