您好,我寫了一個簡單的腳本來輸出HTML中的quickfixengineering,但事實並非如此令人滿意。convertto-html輸出字符代碼而不是字符
$qfe = gwmi -class win32_quickfixengineering
$qfe | select-object -property HotFixID, Description, Caption,
@{LABEL="URL"; EXPRESSION={ "<a href=""" + $_.caption + """>" + $_.caption + "</a>" } } |
ConvertTo-html -Head $style -body "<H2>Windows Update Information (quickfixengineering)
</H2><H3>Creation Date: $date/Entries found: $fixcount</H3> " |
Out-File $scriptpath\html\$file
我的想法是把在HTML鏈接標籤Caption屬性將其轉換爲HTML, 但是當它被actualy轉換某些字符轉換爲HTML字符代碼之前。
像這樣:
<a href="http://go.microsoft.com/fwlink/?LinkId=133041">http:
//go.microsoft.com/fwlink/?LinkId=133041</a>
我試過幾件事情。這些角色並不是真正幫助我(不知道如何用英語稱呼這些東西)。如果事情沒有足夠的文字,這些使得它更加直接。
沒有任何人有一個想法/能幫我請整理了這一點:) TNX
AAHķdidnt知道有一個函數將其整齊地編碼爲html。很好的答案tnx很多 – Moose 2013-02-13 21:26:28