PowerShell Logo Small

Get-SMCounterSample



This is the built-in help made by Microsoft for the command 'Get-SMCounterSample', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Gets performance counter samples for a particular time stamp.

SYNTAX


Get-SMCounterSample [-AsJob] [-BatchSize <UInt32>] [-CimSession <CimSession[]>] [-EndTime <DateTime>] [-StartTime <DateTime>] [-ThrottleLimit <Int32>] -CollectorName
<String> -CounterPath <String[]> [<CommonParameters>]
Get-SMCounterSample [-AsJob] [-BatchSize <UInt32>] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] -CollectorName <String> -CounterPath <String[]> -Timestamp
<DateTime[]> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-SMCounterSample cmdlet gets performance counter samples for a particular time.



<

RELATED LINKS


Online Version: http://go.microsoft.com/fwlink/p/?linkid=287573

REMARKS

<

Examples


Example 1: Get a counter sample from a data collector set

PS C:\>Get-SMCounterSample -CollectorName $ContosoPerf -CounterPath $ContosoCounters -EndTime 12:00 -StartTime 11:00



This command gets the performance sample for the collector named by the variable $ContosoPerf and the counter path named by the variable $ContosoCounters within a specified
timeframe.




Example 1: Get a counter sample at a specified time

PS C:\>Get-SMCounterSample -CollectorName $ContosoPerf -CounterPath $ContosoCounters -TimeStamp $SampleTimes



This command gets the performance sample for the collector named by the variable $ContosoPerf and the counter path named by the variable $ContosoCounters at a specified
time. The timestamp is an array of DateTime objects.