external help file | Module Name | online version | schema |
---|---|---|---|
PSTimers-help.xml |
PSTimers |
2.0.0 |
Get the current status of a simple timer.
Get-MyTimer [[-Name] <String[]>] [<CommonParameters>]
Get-MyTimer [-Status <String>] [<CommonParameters>]
Use this command to get the current status of a timer created with Start-MyTimer. It will display a current elapsed time but will not stop the timer.
PS C:\> Get-MyTimer
Name Start Stop Duration Status
---- ----- ---- -------- ------
ScriptWork 3/4/2023 7:37:36 PM 00:00:00:10 Paused
Betty 3/5/2023 9:57:34 AM 3/5/2023 9:57:54 AM 00:00:00:00 Reset
Client1 3/5/2023 10:29:28 AM 00:00:05:07 Running
Backup 3/5/2023 10:30:15 AM 00:00:04:20 Running
Get the all timers
PS C:\> Get-MyTimer Client1
Name Start Stop Duration Status Description
---- ----- ---- -------- ------ -----------
Client1 3/5/2023 10:29:28 AM 00:00:01:43 Running work for Client1
Get a single timer.
PS C:\> Get-Mytimer -Status Running
Name Start Stop Duration Status Description
---- ----- ---- -------- ------ -----------
Client1 3/5/2023 10:29:28 AM 00:00:00:57 Running work for Client1
Backup 3/5/2023 10:30:15 AM 00:00:00:10 Running
Get timers based on status.
The name for your timer.
Type: String[]
Parameter Sets: name
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True
Filter timers based on status.
Type: String
Parameter Sets: status
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/