小编lol*_*oli的帖子

使用ConvertTo-HTML将URL列表转换为可单击的HTML链接

我下面的函数将创建一个HTML表,但是我希望表中的值具有超链接。

Function MyFunction{

clear-host
$item=$null
$hash = $null #hashTable

$hash =@{"Google.com" = "www.google.com"; "Yahoo" = "www.yahoo.com";"My Directory" ="C:\Users\Public\Favorites" ;"MSN" = "www.msn.com"}

ForEach($item in @($hash.KEYS.GetEnumerator())){
$hash | Sort-Object -Property name
}

$hash.GetEnumerator() | sort -Property Name |Select-Object Name, Value | ConvertTo-HTML | Out-File .\Test.html

}

MyFunction
Run Code Online (Sandbox Code Playgroud)

powershell

5
推荐指数
1
解决办法
6688
查看次数

标签 统计

powershell ×1