You can just direct it to a text file with the Out-File cmdlet.
Get-Compliance -Entity servername -Detailed | Out-File C:\compliance.txt
But that will also give you the default output (selected properties, the way they are displayed...).
If you want more control over the output, you can first direct the objects to the Select-Object cmdlet and then write them for example to a CSV file.
For example
Get-Compliance -Entity $esx -Detailed |
Select @{N="EntityName";E={$_.Entity.Name}},
@{N="Baseline";E={$_.Baseline.Name}},
Status |
Export-Csv C:\compliance.csv -NoTypeInformation -UseCulture