Thanks, Shawn
A little SDK snooping and I found exactly what I need in the Win32_LogicalDisk class.
Sturdy
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:perl-
> [EMAIL PROTECTED] On Behalf Of Shawn Boyle
> Sent: Friday, September 08, 2006 4:02 PM
> To: [EMAIL PROTECTED]
> Cc: perl-win32-admin@listserv.ActiveState.com
> Subject: RE: Lanman replacement?
>
> Everything I used to do with Win32::Lanman I now do with WMI using
> Win32::OLE. I don't know what exactly Lanman::NetServerDiskEnum() returns,
> but one way to enumerate the physical disks on a server is like this:
>
> use Win32::OLE qw(in);
>
> my $wmi = Win32::OLE->GetObject(
>
> "winmgmts:{impersonationLevel=impersonate}!//COMPUTERNAME/root/CIMV2"
> ) or die Win32::OLE::LastError();
>
> my $drives = $wmi->ExecQuery( "SELECT DeviceID, Caption FROM
> Win32_DiskDrive" );
>
> foreach $drive (in( $drives )) {
> print $drive->{Properties_}->{DeviceID}->{Value}.' : '.
> $drive->{Properties_}->{Caption}->{Value}."\n";
> }
>
> If you're looking for partition information, you can get that too with the
> Win32_DiskPartition class.
>
> Of course, WMI needs to be installed on the machine you're querying. I'm
> pretty sure MS included it on all OSes after Win2K, and I think they
> slipstreamed it into SP6 on NT if you're still running any of that.
>
> HTH,
> -Shawn
_______________________________________________ Perl-Win32-Admin mailing list Perl-Win32-Admin@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs