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
16
Scripts/Get-MemorySlots.psm1
Normal file
16
Scripts/Get-MemorySlots.psm1
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
function Get-MemorySlots {
|
||||
$Memory = Get-CimInstance Win32_PhysicalMemory | Select-Object Manufacturer,PartNumber,
|
||||
ConfiguredClockSpeed,@{Label="Memory"; Expression={[string]($_.Capacity/1Mb)}},
|
||||
Tag,DeviceLocator,BankLabel
|
||||
$CollectionMemory = New-Object System.Collections.Generic.List[System.Object]
|
||||
$Memory | ForEach-Object {
|
||||
$CollectionMemory.Add([PSCustomObject]@{
|
||||
Tag = $_.Tag
|
||||
Model = [String]$_.ConfiguredClockSpeed+" Mhz "+$_.Manufacturer+" "+$_.PartNumber
|
||||
Size = [string]($_.Memory)+" Mb"
|
||||
Device = $_.DeviceLocator
|
||||
Bank = $_.BankLabel
|
||||
})
|
||||
}
|
||||
$CollectionMemory
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue