- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get the Process performance counter using PowerShell?
To get all the process-related counters, you need to use the below command.
Example
Get-Counter -ListSet "*Processor*" | Select CounterSetName
Output
CounterSetName -------------- Processor Information Per Processor Network Activity Cycles Per Processor Network Interface Card Activity Hyper-V Worker Virtual Processor Hyper-V Hypervisor Virtual Processor Hyper-V Hypervisor Root Virtual Processor Hyper-V Hypervisor Logical Processor Processor Processor Performance
Now let say we need the Processor Performance counter set then we can use the below command to retrieve all its counters.
PS C:\> Get-Counter -ListSet "Processor Performance" | Select -ExpandProperty Counter \Processor Performance(*)\Processor Frequency \Processor Performance(*)\% of Maximum Frequency \Processor Performance(*)\Processor State Flags
Let assume we need the processor maximum frequency counter among this then,
Example
Get-Counter -Counter '\Processor Performance(*)\% of Maximum Frequency'
Output
To run the performance counter continuously use,
Example
Get-Counter -Counter '\Processor Performance(*)\% of Maximum Frequency' -Continuous
To retrieve the specific number of samples for the specific intervals,
Example
Get-Counter -Counter '\Processor Performance(*)\% of Maximum Frequency' -SampleInterval 2 -MaxSamples 3
- Related Articles
- How to get the windows performance counter using PowerShell?
- How to get the disk performance using PowerShell?
- How to get all the Get-Process properties using PowerShell?
- How to get the specific process(es) information using PowerShell?
- How to get all the processes on the local computer with Get-Process command using PowerShell?
- How to get process output in GridView format in PowerShell ?
- How to get the disk information using PowerShell?
- How to get the folder size using PowerShell?
- How to get the file extension using PowerShell?
- How to Get Windows features using PowerShell?
- How to get pagefile settings using PowerShell?
- How to get mapped drives using PowerShell?
- How to get the readonly files using Get-ChildItem in PowerShell?
- How to get the system files using the Get-ChildItem in PowerShell?
- How to get the Windows certificate details using PowerShell?

Advertisements