$i=(Get-WmiObject -Class Win32_networkadapterconfiguration -Filter ipenabled=true).ipaddress
Get-WmiObject -erroraction silentlycontinue win32_logicaldisk -filter "drivetype = 3" |% {
if ((($_.size-$_.freespace)/$_.size*100).tostring("f2") -gt 80)
{
write $i $_.deviceid 使用空间超过80% >>\\192.168.1.111\temp.txt
}
else
{
}
}