fix not size for list storages windows

This commit is contained in:
garnier-quentin 2020-06-23 15:21:08 +02:00
parent d63c1e898b
commit 088d66e750
1 changed files with 8 additions and 2 deletions

View File

@ -50,10 +50,16 @@ Try {
type = $disk.DriveType;
providername = $disk.ProviderName;
desc = $disk.VolumeName;
size = $disk.Size.toString();
freespace = $disk.FreeSpace.toString()
size = $null;
freespace = $null;
}
if ($disk.Size -ne $null) {
$item.size = $disk.Size.toString()
}
if ($disk.FreeSpace -ne $null) {
$item.freespace = $disk.FreeSpace.toString()
}
$items.Add($item)
}