Subscribe

equivalent to running df -hr

hello all

whats the equivalent command in powershell toolkit for the "DF -HR" command

Re: equivalent to running df -hr

I think what you are looking for is going to be get-navolsize.  However if you wish to manipulate the data once you have it, that is more complicated.

-Scott

edit: This appears to be dependent on the version of the toolkit.  On one laptop I cannot use get-navolsize because of the human readable out, on my current laptop I am getting the raw size output.

Message was edited by: Scott Chubb

Re: equivalent to running df -hr

You actually need more than two commands to get all of the info you are looking for:

Get-NaVol will return the volume size and most properties about it.  Get-NaVolsize works too, and is more specific.

Get-NaSnapshotReserve gets the reserve amount.

To get the closest output to DF -HR, try this:

Get-NaVol | FT -autosize Name,@{ "l" = "SizeGB"; "e" = { "{0:#,##0}" -f ($_.SizeTotal / 1gb) } },@{ "l" = "SizeUsedGB"; "e" = { "{0:#,##0}" -f ($_.SizeUsed / 1gb) } },@{ "l" = "SizeAvailGB"; "e" = { "{0:#,##0}" -f ($_.SizeAvailable / 1gb) } },@{ "l" = "SizeReservedGB"; "e" = { "{0:#,##0}" -f (($_ | Get-NaSnapshotReserve).Size / 1gb) } }