M
Martin
Hi all,
I'm pretty new to perl and toying around with WMI. Now I stumble upon
accessing the attributes of an WMI object.
The problem is as follows:
I've an object reference to Win32_NetworkAdapterConfiguration called
$objItem.
If I say
print "$objItem->{WINSPrimaryServer}\n";
I get the desired output. But if I say
my $pwins = $objItem->{WINSPrimaryServer};
print "$pwins\n";
I don't get any output.
I also tried dereferencing:
my $pwins = ${$objItem->{WINSPrimaryServer}};
but the result is the same.
Using
print Dumper $objItem1;
I get something like:
$VAR1 = bless( {
'Qualifiers_' => bless( {
'Count' => 4
}, 'Win32::OLE' ),
'Properties_' => bless( {
'Count' => 61
}, 'Win32::OLE' ),
'Methods_' => bless( {
'Count' => 41
}, 'Win32::OLE' ),
'Derivation_' => [
'CIM_Setting'
],
'Path_' => bless( {
.........
But I can't find the desired attribute.
Does anybody have an idea, what's going wrong.
Thank,
Martin
I'm pretty new to perl and toying around with WMI. Now I stumble upon
accessing the attributes of an WMI object.
The problem is as follows:
I've an object reference to Win32_NetworkAdapterConfiguration called
$objItem.
If I say
print "$objItem->{WINSPrimaryServer}\n";
I get the desired output. But if I say
my $pwins = $objItem->{WINSPrimaryServer};
print "$pwins\n";
I don't get any output.
I also tried dereferencing:
my $pwins = ${$objItem->{WINSPrimaryServer}};
but the result is the same.
Using
print Dumper $objItem1;
I get something like:
$VAR1 = bless( {
'Qualifiers_' => bless( {
'Count' => 4
}, 'Win32::OLE' ),
'Properties_' => bless( {
'Count' => 61
}, 'Win32::OLE' ),
'Methods_' => bless( {
'Count' => 41
}, 'Win32::OLE' ),
'Derivation_' => [
'CIM_Setting'
],
'Path_' => bless( {
.........
But I can't find the desired attribute.
Does anybody have an idea, what's going wrong.
Thank,
Martin