Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
401 B

  1. # The following sample retrieves the FreeSpace property for all
  2. # instances of the class Win32_LogicalDisk.
  3. use Win32::OLE;
  4. $objServices = Win32::OLE->GetObject('cim:root/cimv2');
  5. $objEnum = $objServices->ExecQuery ('select FreeSpace from Win32_LogicalDisk');
  6. use Win32::OLE::Enum;
  7. foreach $inst (Win32::OLE::Enum->new ($objEnum)->All()) {
  8. print "$inst->{Path_}->{DisplayName}\n";
  9. }