Edit

Get-DeliveryOptimizationLog

Gets Delivery Optimization trace log entries as PowerShell objects.

Syntax

Default (Default)

Get-DeliveryOptimizationLog
    [-LevelFilter <UInt32>]
    [-Provider <ProviderType>]
    [[-Path] <String[]>]
    [-Flush]
    [<CommonParameters>]

Description

The Get-DeliveryOptimizationLog cmdlet reads Delivery Optimization event trace log (ETL) files and writes the log entries to the PowerShell pipeline as objects.

Use Path to read saved ETL files. If you omit Path, the cmdlet reads logs from the Delivery Optimization service log directory, which requires administrator permissions.

Use Flush to flush buffered trace data before reading logs.

Examples

Example 1: Read the local Delivery Optimization logs

Get-DeliveryOptimizationLog

This command reads the default service log directory. Run it from an elevated PowerShell session.

Example 2: Read a saved trace file

Get-DeliveryOptimizationLog -Path 'C:\Logs\DeliveryOptimization.etl'

This command converts entries in the specified ETL file to PowerShell objects.

Example 3: Export the latest logs to a text file

Get-DeliveryOptimizationLog -Flush | Set-Content -Path 'C:\Logs\DeliveryOptimization.txt'

This command flushes buffered trace data and saves the log entries as text. The destination directory must already exist.

Parameters

-Flush

Flushes buffered Delivery Optimization trace data before reading the logs. Run with administrator permissions.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LevelFilter

Specifies the numeric event trace level filter to apply when reading log entries.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Path

Specifies one or more ETL file paths to read. Pass paths directly to Path. If you omit this parameter, the cmdlet reads the Delivery Optimization service log directory.

Although the parameter metadata declares pipeline input support by value and by the Path or PSPath property, the cmdlet selects and reads files before processing pipeline input. Piped paths don't select the files to read.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:PSPath

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Provider

Specifies the Delivery Optimization trace provider to read. The accepted values are Dosvc for the Delivery Optimization service provider and Domgmt for the management provider.

Parameter properties

Type:Microsoft.Windows.DeliveryOptimization.AdminCommands.ProviderType
Default value:None
Accepted values:Dosvc, Domgmt
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

The parameter metadata declares pipeline input support, but piped paths don't select the files to read. Pass ETL file paths directly to Path instead.

Outputs

Microsoft.Windows.DeliveryOptimization.AdminCommands.LogOutput

Delivery Optimization trace log entries.

Notes

Reading the default service logs or using Flush requires an elevated PowerShell session. Use Get-DeliveryOptimizationLogAnalysis to summarize download and peering activity.