Ask The Experts
Ask The Experts
I would need a script to generate the list of volumes which have consumed more than 85% of the maximum-autosize.
Can someone help.
Here you go:
$vols = Get-NcVol foreach ($vol in $vols) { if ($vol.TotalSize -gt 0.85*$($vol.VolumeAutosizeAttributes.MaximumSize)) { Write-Output $vol.Name } }
Gold star for you @donny_lang
Hey Donny, Thanks a lot for the code you shared yesterday. It works fine. However i was looking for something different. I need the volumes whose consumed size is 85% of the autosize. I mean.. Used=0.85*autosize By "Used" i mean Total-available. Can you please help here.
@donny_lang wrote:
Here you go:
$vols = Get-NcVol foreach ($vol in $vols) { if ($vol.TotalSize -gt 0.85*$($vol.VolumeAutosizeAttributes.MaximumSize)) { Write-Output $vol.Name } }
Oops, you're right.
Try this:
$vols = Get-NcVol foreach ($vol in $vols) { if ($($vol.VolumeSpaceAttributes.SizeUsed) -gt 0.85*$($vol.VolumeAutosizeAttributes.MaximumSize)) { Write-Output $vol.Name } }