< Back
Get-DiagnosticData
Post
NAME Get-DiagnosticData
SYNOPSIS
Fetches historical Windows Diagnostic Data uploaded by this machine.
SYNTAX
Get-DiagnosticData [[-StartTime] <DateTime>] [[-EndTime] <DateTime>] [[-RecordCount] <int>] [-BasicTelemetryOnly
<SwitchParameter>] [-DiagnosticDataCategory <int>] [-DiagnosticDataProducer <string>] [-DiagnosticDataType <int>]
[<CommonParameters>]
DESCRIPTION
This cmdlet fetches historical Windows Diagnostic Data uploaded by this machine. The total available historical
data is limited by the diagnostic data store????????s configurations. See 'Set-DiagnosticStoreCapacity' for changes.
PARAMETERS
-StartTime <DateTime>
Query filter parameter. Specifies start time of the window for the oldest event in the fetched set.
Required? false
Position? 0
Default value 1/1/0001 12:00:00 AM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-st <DateTime>
Query filter parameter. Specifies start time of the window for the oldest event in the fetched set.
This is an alias of the StartTime parameter.
Required? false
Position? 0
Default value 1/1/0001 12:00:00 AM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-start <DateTime>
Query filter parameter. Specifies start time of the window for the oldest event in the fetched set.
This is an alias of the StartTime parameter.
Required? false
Position? 0
Default value 1/1/0001 12:00:00 AM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-EndTime <DateTime>
Query filter parameter. Specifies end time of the window for the newest event in the fetched set.
Required? false
Position? 1
Default value 12/31/9999 11:59:59 PM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-et <DateTime>
Query filter parameter. Specifies end time of the window for the newest event in the fetched set.
This is an alias of the EndTime parameter.
Required? false
Position? 1
Default value 12/31/9999 11:59:59 PM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-end <DateTime>
Query filter parameter. Specifies end time of the window for the newest event in the fetched set.
This is an alias of the EndTime parameter.
Required? false
Position? 1
Default value 12/31/9999 11:59:59 PM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-RecordCount <int>
Specifies maximum number of events to fetch.
Required? false
Position? 2
Default value 0
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-rc <int>
Specifies maximum number of events to fetch.
This is an alias of the RecordCount parameter.
Required? false
Position? 2
Default value 0
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-recCount <int>
Specifies maximum number of events to fetch.
This is an alias of the RecordCount parameter.
Required? false
Position? 2
Default value 0
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-c <int>
Specifies maximum number of events to fetch.
This is an alias of the RecordCount parameter.
Required? false
Position? 2
Default value 0
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-count <int>
Specifies maximum number of events to fetch.
This is an alias of the RecordCount parameter.
Required? false
Position? 2
Default value 0
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-DiagnosticDataType <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data type.
See Get-DiagnosticDataTypes for data type IDs.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-ddt <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data type.
See Get-DiagnosticDataTypes for data type IDs.
This is an alias of the DiagnosticDataType parameter.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-dt <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data type.
See Get-DiagnosticDataTypes for data type IDs.
This is an alias of the DiagnosticDataType parameter.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-DiagnosticDataProducer <string>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
producer. See Get-DiagnosticDataProducers for data producer names.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ddp <string>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
producer. See Get-DiagnosticDataProducers for data producer names.
This is an alias of the DiagnosticDataProducer parameter.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-dp <string>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
producer. See Get-DiagnosticDataProducers for data producer names.
This is an alias of the DiagnosticDataProducer parameter.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DiagnosticDataCategory <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
category. See Get-DiagnosticDataCategories for data category IDs.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-ddc <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
category. See Get-DiagnosticDataCategories for data category IDs.
This is an alias of the DiagnosticDataCategory parameter.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-dc <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
category. See Get-DiagnosticDataCategories for data category IDs.
This is an alias of the DiagnosticDataCategory parameter.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-BasicTelemetryOnly <SwitchParameter>
Query filter parameter. Specifies if resultset should only include Basic diagnostic data events.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-basic <SwitchParameter>
Query filter parameter. Specifies if resultset should only include Basic diagnostic data events.
This is an alias of the BasicTelemetryOnly parameter.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-basicOnly <SwitchParameter>
Query filter parameter. Specifies if resultset should only include Basic diagnostic data events.
This is an alias of the BasicTelemetryOnly parameter.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.DateTime
Query filter parameter. Specifies start time of the window for the oldest event in the fetched set.
System.DateTime
Query filter parameter. Specifies end time of the window for the newest event in the fetched set.
System.Int32
Specifies maximum number of events to fetch.
OUTPUTS
DDVCmdlets.Containers.EventRecord
Persisted event record.
---------- EXAMPLE 1 ----------
Get-DiagnosticData -StartTime (Get-Date).AddDays(-1) -RecordCount 1
Returns first (oldest) diagnostic event since yesterday. Sample output below.
Name : Microsoft.Windows.Kernel.PnP.DeviceConfig
Timestamp : 11/8/2018 4:52:53 PM
Payload : JSON PAYLOAD
IsBasic : False
DiagnosticDataTypes : {11}
---------- EXAMPLE 2 ----------
Get-DiagnosticData -StartTime (Get-Date).AddHours(-12) -EndTime (Get-Date).AddHours(-6) -BasicTelemetryOnly
Returns all basic diagnostic events sent between 12 and 6 hours before now.
---------- EXAMPLE 3 ----------
Get-DiagnosticData -DiagnosticDataType 11
Returns diagnostic events tagged with diagnostic data type ID 11. See Get-DiagnosticDataTypes for the list of
diagnostic data types.
RELATED LINKS
SYNOPSIS
Fetches historical Windows Diagnostic Data uploaded by this machine.
SYNTAX
Get-DiagnosticData [[-StartTime] <DateTime>] [[-EndTime] <DateTime>] [[-RecordCount] <int>] [-BasicTelemetryOnly
<SwitchParameter>] [-DiagnosticDataCategory <int>] [-DiagnosticDataProducer <string>] [-DiagnosticDataType <int>]
[<CommonParameters>]
DESCRIPTION
This cmdlet fetches historical Windows Diagnostic Data uploaded by this machine. The total available historical
data is limited by the diagnostic data store????????s configurations. See 'Set-DiagnosticStoreCapacity' for changes.
PARAMETERS
-StartTime <DateTime>
Query filter parameter. Specifies start time of the window for the oldest event in the fetched set.
Required? false
Position? 0
Default value 1/1/0001 12:00:00 AM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-st <DateTime>
Query filter parameter. Specifies start time of the window for the oldest event in the fetched set.
This is an alias of the StartTime parameter.
Required? false
Position? 0
Default value 1/1/0001 12:00:00 AM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-start <DateTime>
Query filter parameter. Specifies start time of the window for the oldest event in the fetched set.
This is an alias of the StartTime parameter.
Required? false
Position? 0
Default value 1/1/0001 12:00:00 AM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-EndTime <DateTime>
Query filter parameter. Specifies end time of the window for the newest event in the fetched set.
Required? false
Position? 1
Default value 12/31/9999 11:59:59 PM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-et <DateTime>
Query filter parameter. Specifies end time of the window for the newest event in the fetched set.
This is an alias of the EndTime parameter.
Required? false
Position? 1
Default value 12/31/9999 11:59:59 PM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-end <DateTime>
Query filter parameter. Specifies end time of the window for the newest event in the fetched set.
This is an alias of the EndTime parameter.
Required? false
Position? 1
Default value 12/31/9999 11:59:59 PM
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-RecordCount <int>
Specifies maximum number of events to fetch.
Required? false
Position? 2
Default value 0
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-rc <int>
Specifies maximum number of events to fetch.
This is an alias of the RecordCount parameter.
Required? false
Position? 2
Default value 0
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-recCount <int>
Specifies maximum number of events to fetch.
This is an alias of the RecordCount parameter.
Required? false
Position? 2
Default value 0
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-c <int>
Specifies maximum number of events to fetch.
This is an alias of the RecordCount parameter.
Required? false
Position? 2
Default value 0
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-count <int>
Specifies maximum number of events to fetch.
This is an alias of the RecordCount parameter.
Required? false
Position? 2
Default value 0
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-DiagnosticDataType <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data type.
See Get-DiagnosticDataTypes for data type IDs.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-ddt <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data type.
See Get-DiagnosticDataTypes for data type IDs.
This is an alias of the DiagnosticDataType parameter.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-dt <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data type.
See Get-DiagnosticDataTypes for data type IDs.
This is an alias of the DiagnosticDataType parameter.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-DiagnosticDataProducer <string>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
producer. See Get-DiagnosticDataProducers for data producer names.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ddp <string>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
producer. See Get-DiagnosticDataProducers for data producer names.
This is an alias of the DiagnosticDataProducer parameter.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-dp <string>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
producer. See Get-DiagnosticDataProducers for data producer names.
This is an alias of the DiagnosticDataProducer parameter.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DiagnosticDataCategory <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
category. See Get-DiagnosticDataCategories for data category IDs.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-ddc <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
category. See Get-DiagnosticDataCategories for data category IDs.
This is an alias of the DiagnosticDataCategory parameter.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-dc <int>
Query filter parameter. Specifies if resultset should only include events having this diagnostic data
category. See Get-DiagnosticDataCategories for data category IDs.
This is an alias of the DiagnosticDataCategory parameter.
Required? false
Position? named
Default value -2147483648
Accept pipeline input? false
Accept wildcard characters? false
-BasicTelemetryOnly <SwitchParameter>
Query filter parameter. Specifies if resultset should only include Basic diagnostic data events.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-basic <SwitchParameter>
Query filter parameter. Specifies if resultset should only include Basic diagnostic data events.
This is an alias of the BasicTelemetryOnly parameter.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-basicOnly <SwitchParameter>
Query filter parameter. Specifies if resultset should only include Basic diagnostic data events.
This is an alias of the BasicTelemetryOnly parameter.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.DateTime
Query filter parameter. Specifies start time of the window for the oldest event in the fetched set.
System.DateTime
Query filter parameter. Specifies end time of the window for the newest event in the fetched set.
System.Int32
Specifies maximum number of events to fetch.
OUTPUTS
DDVCmdlets.Containers.EventRecord
Persisted event record.
---------- EXAMPLE 1 ----------
Get-DiagnosticData -StartTime (Get-Date).AddDays(-1) -RecordCount 1
Returns first (oldest) diagnostic event since yesterday. Sample output below.
Name : Microsoft.Windows.Kernel.PnP.DeviceConfig
Timestamp : 11/8/2018 4:52:53 PM
Payload : JSON PAYLOAD
IsBasic : False
DiagnosticDataTypes : {11}
---------- EXAMPLE 2 ----------
Get-DiagnosticData -StartTime (Get-Date).AddHours(-12) -EndTime (Get-Date).AddHours(-6) -BasicTelemetryOnly
Returns all basic diagnostic events sent between 12 and 6 hours before now.
---------- EXAMPLE 3 ----------
Get-DiagnosticData -DiagnosticDataType 11
Returns diagnostic events tagged with diagnostic data type ID 11. See Get-DiagnosticDataTypes for the list of
diagnostic data types.
RELATED LINKS