Highlighting HTML fragment without saving it to file
I have a PowerShell command that returns an HTML snippet:
(Get-AzureResourceGroupGalleryTemplate -Identity Microsoft.WebSiteSQLDatabase.0.3.17-preview).description
Is there a way to easily display this snippet without saving it to a file? for example is it possible to throw it into a web browser?
+3
source to share
2 answers
Create a new instance of Internet Explorer and add an HTML snippet to the body of a blank page:
$id = 'Microsoft.WebSiteSQLDatabase.0.3.17-preview' $html = (Get-AzureResourceGroupGalleryTemplate -Identity $id).description $ie = New-Object -COM 'InternetExplorer.Application' $ie.Navigate('about:blank') do { Start-Sleep -Milliseconds 100 } until ($ie.ReadyState -eq 4) $ie.Document.body.innerHTML = $html $ie.Visible = $true
+3
source to share