PS-Commands/Scripts/Get-VideoCard.psm1

15 lines
652 B
PowerShell
Raw Normal View History

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"
})
}
$CollectionVC
}