Skip to content

Instantly share code, notes, and snippets.

@squeakerdev
Last active January 25, 2024 03:54
Show Gist options
  • Save squeakerdev/da739d4dd62aff2d4b7a432d5d7bd4c7 to your computer and use it in GitHub Desktop.
Save squeakerdev/da739d4dd62aff2d4b7a432d5d7bd4c7 to your computer and use it in GitHub Desktop.
Powershell utility to check for IRQ sharing on Windows systems
try {
$irqs = Get-WmiObject -Class Win32_IRQResource
$sharedIRQs = $irqs | Group-Object -Property IRQNumber | Where-Object { $_.Count -gt 1 }
if (-not $sharedIRQs -or $sharedIRQs.Count -eq 0) {
Write-Output "No IRQs are shared."
} else {
foreach ($irq in $sharedIRQs) {
Write-Output "IRQ $($irq.Name) is shared by the following devices:"
$irq.Group | ForEach-Object { Write-Output " $($_.Name)" }
Write-Output ""
}
}
} catch {
Write-Output "An error occurred: $_"
}
Write-Host "`r`nPress Enter to exit."
do {
$key = [Console]::ReadKey($true).Key
} while ($key -ne 'Enter')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment