Skip to content

Commit 0b43feb

Browse files
author
Jaromir Kaspar
authored
Merge pull request #387 from microsoft/dev
fixed Get-PhysicalDisk parameter
2 parents 2046435 + 1411fa1 commit 0b43feb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Scripts/0_Shared.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function Get-VolumePhysicalDisk {
7474
$partitionVolumes = Get-cimInstance -Query "ASSOCIATORS OF {Win32_DiskPartition.DeviceID=`"$($partition.DeviceID)`"} WHERE AssocClass = Win32_LogicalDiskToPartition"
7575
foreach($partitionVolume in $partitionVolumes) {
7676
if($partitionVolume.Name -eq $Volume) {
77-
$physicalDisk = Get-PhysicalDisk -DeviceNumber $disk.Index
77+
$physicalDisk = Get-PhysicalDisk | Where-Object DeviceID -eq $disk.Index
7878
return $physicalDisk
7979
}
8080
}

0 commit comments

Comments
 (0)