我使用下面的powershell脚本将输出写入html文件,问题是它将所有内容呈现为文本.
我的代码:
$PagesObject = New-Object PSObject
Add-Member -input $PagesObject noteproperty 'Site Url' $spweb.url
Add-Member -input $PagesObject noteproperty 'Page Title' $PageTitle
Add-Member -input $PagesObject noteproperty 'Page Url' "<a href="$PagesUrl">$PageTitle</a>"
$results += $PagesObject
$results | ConvertTo-HTML -head $a -body | Out-File \\myfolder\InventoryReports\$CurrentMonth.html
Run Code Online (Sandbox Code Playgroud)
我想将其呈现为可点击链接
检查下面的屏幕截图,看看它现在是如何渲染的

提前致谢
我试图循环一个json对象,并使用键将选定的值推送到数组.
$json = ' { "from": 1, "to": 2, "total": 2, "currentPage": 1, "totalPages": 1, "queryTime": "0.004", "totalTime": "0.020", "partial": false, "canonicalUrl": "/v1/products(offers.type=deal_of_the_day)?format=json&apiKey=946n9vuhdkgeyz2qx2dpxd54","products": [ { "sku": 5998225, "productId": 1219180376135, "name": "LG - 1.1 Cu. Ft. Mid-Size Microwave - Black", "source": "bestbuy", "type": "HardGood", "startDate": "2014-07-06","new": false, "active": true, "lowPriceGuarantee": true, "activeUpdateDate": "2014-11-03T19:43:46", "regularPrice": 124.99, "salePrice": 99.99, "onSale": true},{ "sku": 2634897, "productId": 1218343205770, "name": "Rocketfish In-Wall HDMI Cable", "source": "bestbuy", "type": "HardGood", "startDate": "2011-08-14", "new": false, "active": true,"lowPriceGuarantee": false, "activeUpdateDate": "2014-11-03T18:03:02", …Run Code Online (Sandbox Code Playgroud)