One-Liner to return the Drivespace on Servers. Includes Mounted drives


posted by noelstephenson
02-22-2011

Downloads: 393
File size: 279 B
Views: 1,683

Embed
One-Liner to return the Drivespace on Servers. Includes Mounted drives
  1. Get-WMIObject Win32_Volume -filter "DriveType=3" -computer (Get-Content c:\scripts\computers.txt) | Select SystemName, Caption, Label, @{Name="size(GB)";Expression={"{0:N1}" -f($_.capacity/1gb)}},@{Name="freespace(GB)";Expression={"{0:N1}" -f($_.freespace/1gb)}} | Out-GridView 

Uses WMI to return the Capacity and Freespace of all drives

Create a text file c:\scripts\computers.txt containing your server list then run. Hope some of you find this useful

 

Comments

Miguel Vaz wrote re: One-Liner to return the Drivespace on Servers. Includes Mounted drives
on 03-04-2011 11:19 AM

Thanks for the usefull Tip. I have already implemented a slight variation of it in my corporate Powershell environment

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.