- 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 disk performance using PowerShell?
To get the disk performance using PowerShell, we need to use the Performance counter of the disk. There are performance counters available for the Physical disk or the logical disk. To check what the disks related counter sets are available we can use the below command,
Example
PS C:\> Get-Counter -ListSet "*disk*" | Select CounterSetName
Output
CounterSetName -------------- FileSystem Disk Activity Storage Spaces Virtual Disk LogicalDisk PhysicalDisk
We will use a Logical disk to get more information about it. We will retrieve its counter first.
Example
Get-Counter -ListSet LogicalDisk | Select -ExpandProperty Counter
Output
We need to retrieve the Disk read time counter,
Example
Get-Counter -Counter '\LogicalDisk(*)\% Disk Read Time'
Output
The below command will retrieve the 2 sample counts with 2 sample intervals.
Example
Get-Counter -Counter '\LogicalDisk(*)\% Disk Read Time' -MaxSamples 2 -SampleInterval 2
To get the continuous intervals, use the below command.
Example
Get-Counter -Counter '\LogicalDisk(*)\% Disk Read Time' -Continuous
- Related Articles
- How to get the disk information using PowerShell?
- How to get the windows performance counter using PowerShell?
- How to get the Process performance counter using PowerShell?
- How to get the Azure VM disk encryption settings using PowerShell?
- How to get the Azure VM disk caching settings using PowerShell?
- How to format the disk using PowerShell?
- How to change the local disk name using PowerShell?
- How to find the disk type of the Azure Availability set using PowerShell?
- How to get all the Get-Process properties using PowerShell?
- How to get the file extension using PowerShell?
- How to get the folder size using PowerShell?
- How to get the readonly files using Get-ChildItem in PowerShell?
- How to Get Windows features using PowerShell?
- How to get mapped drives using PowerShell?
- How to get pagefile settings using PowerShell?

Advertisements