To get all the process-related counters, you need to use the below command.
Get-Counter -ListSet "*Processor*" | Select CounterSetName
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,
Get-Counter -Counter '\Processor Performance(*)\% of Maximum Frequency'
To run the performance counter continuously use,
Get-Counter -Counter '\Processor Performance(*)\% of Maximum Frequency' -Continuous
To retrieve the specific number of samples for the specific intervals,
Get-Counter -Counter '\Processor Performance(*)\% of Maximum Frequency' -SampleInterval 2 -MaxSamples 3