use strict; use warnings; use Win32::OLE (); my $computer = '.'; my $obj = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\cimv2") or die("$^E\n"); my $devices = $obj->InstancesOf("Win32_NetworkAdapter"); foreach my $device (Win32::OLE::in $devices) { my $adapter_type = $device->{AdapterType}; next unless defined $adapter_type && $adapter_type eq 'Ethernet 802.3'; print 'Win32_NetworkAdapter ', $device->{ Index }, $/, $device->{ DeviceID }, $/, $device->{ PNPDeviceID }, $/, $device->{ Name }, $/, $device->{ Description }, $/, $device->{ ProductName }, $/, $device->{ Manufacturer }, $/, $device->{ MACAddress }, $/, $/; } #### use strict; use warnings; use Win32::OLE (); my $computer = '.'; my $obj = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\cimv2") or die("$^E\n"); my $slots = $obj->InstancesOf("Win32_SystemSlot"); foreach my $slot (Win32::OLE::in $slots) { print $slot->{ SlotDesignation }, $/, $slot->{ Description }, $/, $slot->{ Tag }, $/, join(', ', @{$slot->{ConnectorType}}), $/, $/; } print("PCI = 43\n"); print("ISA = 44\n");