HTML在PowerShell发送的电子邮件中不能正确显示
我有一个脚本,它在HTML页面上的所有服务器上显示磁盘空间,并且从保存的HTML文件的内容并排发送电子邮件。 HTML文件是完美的,并且电子邮件在HTML文件中显示相同的表格信息。 但是,这些表格在电子邮件中重叠。 代码如下: $freeSpaceFileName = "c:\script\FreeSpace.htm" $serverlist = "c:\script\computers.txt" $warning = 50 $critical = 30 New-Item -ItemType file $freeSpaceFileName -Force # Getting the freespace info using WMI #Get-WmiObject win32_logicaldisk | Where-Object {$_.drivetype -eq 3} | format-table DeviceID, VolumeName,status,Size,FreeSpace | Out-File FreeSpace.txt # Function to write the HTML Header to the file Function writeHtmlHeader { […]