DEV/DisRes/Get-DisRes.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<#
.SYNOPSIS
Gets the supported Display Resolution of the Video Adapters
 
.DESCRIPTION
Gets the supported Display Resolution of the Video Adapters
 
.LINK
https://osd.osdeploy.com/module/functions/get-disres
 
.NOTES
21.1.27 David Segura @SeguraOSD
#>

function Get-DisRes {
    [CmdletBinding()]
    Param ()
    
    Return (Get-CimInstance -Class CIM_VideoControllerResolution | `
    Where-Object {$_.ScanMode -eq 4} | `
    Where-Object {$_.HorizontalResolution -ge 800} | `
    Select-Object -Property SettingID, Caption, HorizontalResolution, VerticalResolution, NumberOfColors, RefreshRate | `
    Sort-Object -Property HorizontalResolution, VerticalResolution -Descending)
}