Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region Video сontrollers
- # Integrated graphics
- IF ((Get-CimInstance -ClassName CIM_VideoController | Where-Object -FilterScript {$_.AdapterDACType -eq "Internal"}))
- {
- $Caption = @{
- Name = "Model"
- Expression = {$_.Caption}
- }
- $VRAM = @{
- Name = "VRAM, GB"
- Expression = {[math]::round($_.AdapterRAM/1GB)}
- }
- Get-CimInstance -ClassName CIM_VideoController | Where-Object -FilterScript {$_.AdapterDACType -eq "Internal"} | Select-Object -Property $Caption, $VRAM
- }
- # Dedicated graphics
- IF ((Get-CimInstance -ClassName CIM_VideoController | Where-Object -FilterScript {$_.AdapterDACType -ne "Internal"}))
- {
- $qwMemorySize = (Get-ItemProperty -Path "HKLM:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0*" -Name HardwareInformation.qwMemorySize -ErrorAction SilentlyContinue)."HardwareInformation.qwMemorySize"
- $VRAM = [math]::round($qwMemorySize/1GB)
- Get-CimInstance -ClassName CIM_VideoController | Where-Object -FilterScript {$_.AdapterDACType -ne "Internal"} | ForEach-Object -Process {
- [PSCustomObject] @{
- Model = $_.Caption
- "VRAM, GB" = $VRAM
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement