use Win32::OLE;

$wmi = Win32::OLE->GetObject ("winmgmts://$server/root/cimv2");
($harddisk) = (in $wmi->InstancesOf ('Win32_DiskDrive'));
$sectors = $harddisk->{TotalSectors};
$bytes = $harddisk->{BytesPerSector};
$total = $sect * $byte;
$total = $tota/1024;            # B -> KB
$total = $tota/1024;            # KB -> MB
$total = $tota/1024;            # MB -> GB
print $total . "\n";


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to