我有一个返回HTML代码段的PowerShell命令:
(Get-AzureResourceGroupGalleryTemplate -Identity Microsoft.WebSiteSQLDatabase.0.3.17-preview).description
Run Code Online (Sandbox Code Playgroud)

有没有办法轻松渲染该片段而无需先将其保存到文件中?例如,也许把它扔进网络浏览器?
创建一个新的Internet Explorer实例,并将HTML代码段注入空白页面的正文中:
$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
Run Code Online (Sandbox Code Playgroud)