Skip to content

Instantly share code, notes, and snippets.

@raulunzue
Created April 19, 2020 17:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Get-WMIObject  -Class Win32_LogicalDisk | Where-Object {$_.DriveType -eq 3}  `
| Select-Object @{n="Unidad";e={($_.Name)}},
@{n="Etiqueta";e={($_.VolumeName)}},
@{n='Tamaño (GB)';e={"{0:n2}" -f ($_.size/1gb)}},
@{n='Libre (GB)';e={"{0:n2}" -f ($_.freespace/1gb)}},
@{n='% Libre';e={"{0:n2}" -f ($_.freespace/$_.size*100)}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment