I suggest you ...

Fix Disk Partition to Logical Disk Discovery Rule (fails on Spanned Volumes)

Management Pack Name: Windows Server 2012 Operating System (Discovery)
Management Pack Version: 6.0.7297.0
Discovery Rule Name: Disk Partition to Logical Disk Discovery Rule
Discovery Rule Target: Windows Server 2012 Disk Partition
Discovered Relationships: Disk Partition Contains Logical Disk
Description: This rule discovers the relationships between disk partitions and logical disks

Bug found in script DiskPartitionContainsLogicalDisk.ps1

Bug found on line 332:
$oInstanceLogicalDisk.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.LogicalDevice']/DeviceID$", $WMISet.DeviceID)

Problem Cause:
The $WMISet could be of type System.Array if WMI query returns multiple objects. This can happen if the partition is part of a Dynamic Volume with Spanned Layout (mulitple disks for one volume).

Possible workarround could be:
$oInstanceLogicalDisk.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.LogicalDevice']/DeviceID$", $WMISet[0].DeviceID)

1 vote
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Reidar Johansen shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base