Hi,
Please help, I am unable to get free space on Unix VMs for "/" partition
Below is my script
$VmInfo | where{$_.'MountPoint' -Match '^C:\\|^/' -and $_.'FreeSpace(%)' -le 20 -and $_.'VM PowerState' -eq 'PoweredOn' -and $_.'Folder' -Match '^Corporate|^Management-Servers'} | sort-object 'FreeSpace(%)'
I am able to see C: but for / it is listing all the drives like /opt, /boot etc but I want only for / partition
Please help.
Try to change that RegEx expression to
where{$_.MountPoint -Match "(^C:\\|^/$)"
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try to change that RegEx expression to
where{$_.MountPoint -Match "(^C:\\|^/$)"
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you very much