Main example
List instances
# Abstract class: Get-CimInstance returns the instances of its subclasses
Get-CimInstance -ClassName __TimerInstruction -Namespace 'root' |
Select-Object -Property TimerId, SkipIfPassedAbstract class: it has no instances of its own. Get-CimInstance returns the instances of its subclasses (__AbsoluteTimerInstruction, __IntervalTimerInstruction).
Examples
Query a remote computer (CIM session)
review before running# Name of the remote computer
$computerName = 'SERVER01'
# The CIM session (WSMan by default) can be reused for several queries
$cimSession = New-CimSession -ComputerName $computerName
try {
$cimParameters = @{
CimSession = $cimSession
ClassName = '__TimerInstruction'
Namespace = 'root'
}
Get-CimInstance @cimParameters |
Select-Object -Property TimerId, SkipIfPassed
} finally {
Remove-CimSession -CimSession $cimSession
}WSMan (WinRM) is used by default. For a host without WinRM, create the session with -SessionOption (New-CimSessionOption -Protocol Dcom). Add -Credential to use another account.
Show the class structure
# Class structure: properties, types and flags (Key, ReadOnly…)
$cimClass = Get-CimClass -ClassName __TimerInstruction -Namespace 'root'
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description |
|---|---|---|---|
| SkipIfPassed# | boolean | read | Describes whether a notification event will be generated and receive when a consumer becomes available. FALSE When WMI or the consumer becomes available again, a notification event will be generated and received. TRUE The timer event does not occur if WMI is unavailable to generate it at the appropriate time interval, or the consumer requesting to receive the event is unavailable. Code |
| TimerId# key | string | read | Unique user-assigned string that identifies this particular timer event. To avoid naming conflicts with other timer identifiers, the string form of a distributed computer environment (DCE)-style GUID can be used. This property is part of the __TimerEvent instance that represents the event. Code |
Remarks
The __TimerInstruction class is derived from __EventGenerator.
The __TimerInstruction subclasses are __AbsoluteTimerInstruction, used by consumers to register for an absolute timer event, and __IntervalTimerInstruction, used to register for an interval timer event.
Inheritance
Superclass chain
- __SystemClass
- __IndicationRelated
- __EventGenerator
- __TimerInstruction
Known subclasses
Requirements
- Namespace
- root
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- DLL
- All
Class qualifiers
abstract
Microsoft source
Descriptions, properties and methods come from the Microsoft documentation (MicrosoftDocs/win32 repository), published under the CC BY 4.0 licence. Formatting and translations are specific to this site; the PowerShell examples are written for it.