ProliantFan
Technical User
Hi guys,
As a real scripting Noob i can figure out how to get what i want with this script
Get-WMIObject Win32_LogicalDisk -filter “DriveType=3" -computer (Get-Content "\\server\Share\scripts\servers.txt") | Select SystemName,DeviceID,VolumeName,@{Name=”size(GB)”;Expression={“{0:N1}” -f($_.size/1gb)}},@{Name=”freespace(GB)”;Expression={“{0:N1}” -f($_.freespace/1gb)}},@{Name=”ProcentFree”;Expression={“{0:N1}” -f($_.freespace/$_.size * 100)}} | Out-GridView
This script gives me a nice view of all disk for all servers with the percentage of free diskspace.
But what would like to add is if the %free is less than 10% that a warning is given in an extra colom. Anyone have any idea's ?
As a real scripting Noob i can figure out how to get what i want with this script
Get-WMIObject Win32_LogicalDisk -filter “DriveType=3" -computer (Get-Content "\\server\Share\scripts\servers.txt") | Select SystemName,DeviceID,VolumeName,@{Name=”size(GB)”;Expression={“{0:N1}” -f($_.size/1gb)}},@{Name=”freespace(GB)”;Expression={“{0:N1}” -f($_.freespace/1gb)}},@{Name=”ProcentFree”;Expression={“{0:N1}” -f($_.freespace/$_.size * 100)}} | Out-GridView
This script gives me a nice view of all disk for all servers with the percentage of free diskspace.
But what would like to add is if the %free is less than 10% that a warning is given in an extra colom. Anyone have any idea's ?