20 lines
753 B
PowerShell
20 lines
753 B
PowerShell
# Get EDID information from the registry
|
|
$monitors = Get-ChildItem "HKLM:\SYSTEM\CurrentControlSet\Enum\DISPLAY"
|
|
|
|
foreach ($monitor in $monitors) {
|
|
$monitorKeyPath = "HKLM:\SYSTEM\CurrentControlSet\Enum\DISPLAY\$($monitor.PSChildName)"
|
|
$subKeys = Get-ChildItem $monitorKeyPath
|
|
|
|
foreach ($subKey in $subKeys) {
|
|
$deviceParamsPath = "$monitorKeyPath\$($subKey.PSChildName)\Device Parameters"
|
|
$edid = Get-ItemProperty -Path $deviceParamsPath -Name EDID -ErrorAction SilentlyContinue
|
|
|
|
if ($edid) {
|
|
$edidHex = ($edid.EDID | ForEach-Object { '{0:X2}' -f $_ }) -join ' '
|
|
Write-Host "Monitor: $($monitor.PSChildName)"
|
|
Write-Host "EDID: $edidHex"
|
|
Write-Host ""
|
|
}
|
|
}
|
|
|
|
} |