Nov 25

Find Free Physical Memory by dos command powershell

How to find Free Physical Memory

Below are the command to get Free Physical Memory via command line and power-shell.

Command Line

Get-WmiObject -Query ‘Select * from Win32_OperatingSystem’ | Select FreePhysicalMemory | Format-Table -AutoSize;

PowerShell

Powershell -noexit -command “&{Get-WmiObject -Query ‘Select * from Win32_OperatingSystem’ | Select FreePhysicalMemory | Format-Table -AutoSize;}”

Get-Process | Select Name, @{Name=’CPU(s)’;Expression={$_.CPU}} | sort ‘CPU(s)’ -Descending | Select -First 5| Format-Table -AutoSize;

 

 

Permanent link to this article: http://www.techxpress.in/find-free-physical-memory-by-dos-command-powershell/

Nov 25

List top 5 process consuming CPU

List top 5 process consuming CPU

Command Line

@echo Powershell -command “&{Get-Process | Select Name, @{Name=’CPU(s)’;Expression={$_.CPU}} | sort ‘CPU(s)’ -Descending | Select -First 5| Format-Table -AutoSize;}”

PowerShell

Get-Process | Select Name, @{Name=’CPU(s)’;Expression={$_.CPU}} | sort ‘CPU(s)’ -Descending | Select -First 5| Format-Table -AutoSize;

 

 

 

Permanent link to this article: http://www.techxpress.in/list-top-5-process-consuming-cpu/

Nov 25

How to find CPU Usage via Command line PowerShell.

CPU Usage via Command line.

@echo off

Powershell -command “&{Get-WmiObject -Query ‘Select * from Win32_PerfFormattedData_PerfProc_Process ‘| Select Name, @{Name=’CPU(p)’;Expression={$_.PercentProcessorTime}} | where {$_.’CPU(p)’ -gt 0 } |Sort ‘CPU(p)’ -descending | Format-Table -AutoSize;}”

CPU Usage via PowerShell

Get-WmiObject -Query ‘Select * from Win32_PerfFormattedData_PerfProc_Process ‘| Select Name, @{Name=’CPU(p)’;Expression={$_.PercentProcessorTime}} | where {$_.’CPU(p)’ -gt 0 } |Sort ‘CPU(p)’ -descending | Format-Table -AutoSize;}”

 

 

Permanent link to this article: http://www.techxpress.in/how-to-find-cpu-usage-via-command-line-powershell/

Older posts «

» Newer posts

Bookmark this page