Hello guys
I have tried some approaches that I have saw here on forum, but I´m stuck on script as follow:
the parameter -ExpandProperty not work to isolate data for html.
If someone has already pass through this, any help will welcome
thanks for attention, sorry for any misspelling
see ya
$computer = "localhost"
$Body = "
BODY{background-color:#eeeeee;}
TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}
TH{text-align:center;width:140px; border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:#38eeff}
TD{text-align:center;border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:white}
Disk Space Report: $DateComputerDiskSpace AvailablePercentStatus"
$total_disk = Get-WmiObject -class Win32_LogicalDisk -computername $computer -filter "drivetype=3" | select @{label='Tamanho do Disco (GB)';expression={$_.Size / 1GB -as [int]}}
$space_free = Get-WmiObject -class Win32_LogicalDisk -computername $computer -filter "drivetype=3" | select @{label='Espaco Livre (MB)';expression={$_.FreeSpace / 1MB -as [int]}}
$percent_free = Get-WmiObject -class Win32_LogicalDisk -computername $computer -filter "drivetype=3" | select @{label='% Livre';expression={$_.FreeSpace / $_.Size * 100 -as [int]}}
$Body += "$computer$total_disk$space_free$percent_free$ServerStatus"
$Body += ""
$body | out-file c:\temp\body.html
Invoke-Expression C:\temp\body.html
thank you very much