Fork me on GitHub

This is the list of commandlets for system queries.

Hardware

Get-TotalRam

Description

Returns the total amount of RAM on the current machine, in MB.

Parameters

This cmdlet does not have any parameters.

Code sample

Get-TotalRam

Get-DiskSize

Description

Returns the total size of the target disk, in MB.

Parameters

Name Type Required Description Example
Letter char Drive letter C

Code sample

Get-DiskSize -Letter 'C'

Get-DiskFreeSpace

Description

Return the free space of the target disk, in MB.

Parameters

Name Type Required Description Example
Letter char Drive letter C

Code sample

Get-DiskFreeSpace -Letter 'C'