Powershell. Get remote servers HDD size stats


SUBMITTED BY: Guest

DATE: Nov. 21, 2013, 5:39 a.m.

FORMAT: Text only

SIZE: 200 Bytes

HITS: 1054

  1. $disk = Get-WmiObject Win32_LogicalDisk -ComputerName myServer -Filter "DeviceID='D:'" | Select-Object Size,FreeSpace
  2. $disk.Size / (1024*1024*1024)
  3. $disk.FreeSpace / (1024*1024*1024)

comments powered by Disqus