2023-12-12 16:39:28 +03:00
|
|
|
function Get-VideoCard {
|
|
|
|
|
$VideoCard = Get-CimInstance Win32_VideoController | Select-Object @{
|
|
|
|
|
Label="VideoCard"; Expression={$_.Name}}, @{Label="Display"; Expression={
|
|
|
|
|
[string]$_.CurrentHorizontalResolution+"x"+[string]$_.CurrentVerticalResolution}},
|
|
|
|
|
@{Label="vRAM"; Expression={($_.AdapterRAM/1Gb)}}
|
|
|
|
|
$CollectionVC = New-Object System.Collections.Generic.List[System.Object]
|
|
|
|
|
$VideoCard | ForEach-Object {
|
|
|
|
|
$CollectionVC.Add([PSCustomObject]@{
|
|
|
|
|
Model = $_.VideoCard
|
|
|
|
|
Display = $_.Display
|
2024-01-29 23:41:19 +03:00
|
|
|
VideoRAM = [string]$([int]$($_.vRAM))+" Gb"
|
2023-12-12 16:39:28 +03:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
$CollectionVC
|
|
|
|
|
}
|