PowerShell - MemoryPowerShell - Disk Check with CIM_PhysicalMemoryOur mission to investigate and interrogate a computer's disk. Goals include discovering the size of each volume and how much free space is available on each of those volumes. We also have pure PowerShell goals, to examine the 'Select' statement, and to control the display with -groupby |sort and -auto. Topics for PowerShell Disk CheckTrusty Twosome (Get-Help and Get-Member)When you discover a new PowerShell command, it benefits from being surveyed with what I call the 'Trusty Twosome'. Research with Get-Help and Get-Member and reveal new scripting possibilities for Get-WmiObject CIM_PhysicalMemory. To see what I mean try these two commands: 1) get-help Get-WmiObject CIM_PhysicalMemory Get-help unearths useful parameters such as -class and -computerName (-computer also works). 2) get-WmiObject CIM_PhysicalMemory |get-Member Get-Member (gm) reveals a whole host of properties that you don't normally see in the Control Panel. Example 1a - Display CIM_PhysicalMemoryThe simplest possible script to display memory # Display CIM_PhysicalMemory
˚
See more Microsoft PowerShell tutorials:• PowerShell Home • Com • Shell Application • Active Directory • QAD Snap-in • Get-Member Please write in if you see errors of any kind. Please report any factual mistakes, grammatical errors or broken links, I will be happy to not only to correct the fault, but also to give you credit.
*
|
||||||