不想显示行。
$out= "C:\temp\DD2.html"
$css = @'
<style>
* {
font-family: Calibri, sans-serif;
padding: 10px;
margin: 0px;
text-align: left;
font-size: 20px;
}
table {
border: 1px solid black;
width: 100%;
border-collapse: collapse;
}
td, th {
border: 1px solid black;
}
</style>
'@
[string]$html = Import-Csv "C:\Users.csv" | ConvertTo-Html -PreContent $css | Out-File $out
答案1
Import-Csv "C:\Users.csv" | Where-Object ($_.Parameter -ne "Windows" -and $_.Parameter -ne "Antivirus") | ConvertTo-Html...