Last active
January 25, 2024 03:54
-
-
Save squeakerdev/da739d4dd62aff2d4b7a432d5d7bd4c7 to your computer and use it in GitHub Desktop.
Powershell utility to check for IRQ sharing on Windows systems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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