Add modules from WinAPI (process managment and cim hardware)
This commit is contained in:
parent
3514ec6e3d
commit
bbfdb5d61f
11 changed files with 243 additions and 0 deletions
15
Scripts/Get-VideoCard.psm1
Normal file
15
Scripts/Get-VideoCard.psm1
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
VideoRAM = [string]$_.vRAM+" Gb"
|
||||
})
|
||||
}
|
||||
$CollectionVC
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue