Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions hyperv-tools/DiscreteDeviceAssignment/SurveyDDA.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ $pnpdevs = Get-PnpDevice -PresentOnly
$pcidevs = $pnpdevs | Where-Object {$_.InstanceId -like "PCI*"}

foreach ($pcidev in $pcidevs) {
$locationpath = ($pcidev | get-pnpdeviceproperty DEVPKEY_Device_LocationPaths).data[0]
Write-Host ""
Write-Host ""
Write-Host -ForegroundColor White -BackgroundColor Black $pcidev.FriendlyName
Write-Host -ForegroundColor Yellow -BackgroundColor Black $locationpath


$rmrr = ($pcidev | Get-PnpDeviceProperty $devpkey_PciDevice_RequiresReservedMemoryRegion).Data
if ($rmrr -ne 0) {
Expand Down Expand Up @@ -66,8 +69,6 @@ foreach ($pcidev in $pcidevs) {
}
}

$locationpath = ($pcidev | get-pnpdeviceproperty DEVPKEY_Device_LocationPaths).data[0]

#
# If the device is disabled, we can't check the resources, report a warning and continue on.
#
Expand All @@ -76,7 +77,6 @@ foreach ($pcidev in $pcidevs) {
{
Write-Host -ForegroundColor Yellow -BackgroundColor Black "Device is Disabled, unable to check resource requirements, it may be assignable."
Write-Host -ForegroundColor Yellow -BackgroundColor Black "Enable the device and rerun this script to confirm."
$locationpath
continue
}

Expand Down Expand Up @@ -137,7 +137,6 @@ foreach ($pcidev in $pcidevs) {
# change even if you add or remove devices from the machine or change the way that
# the BIOS is configured.
#
$locationpath
}

#
Expand Down