Citrix Virtual Apps and Desktops SDK

Get-LogSummary

Gets operations logged within time intervals inside a date range.

Syntax

Get-LogSummary
   [-StartDateRange <DateTime>]
   [-EndDateRange <DateTime>]
   [-IntervalSeconds <Int64>]
   [-GetLowLevelOperations]
   [-IncludeIncomplete]
   [-OperationType <OperationType>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

The Get-LogSummary cmdlet retrieves summary counts of operations logged within time intervals inside a date range. The returned data indicates the rate at which configuration changes and activities were performed out within a time period.

Examples

EXAMPLE 1

Get a summary of all completed high level operations. The returned log summary collection will contain a single item for the time period spanning the entire [1900-01-01 00:00:00]-[UtcNow] date range. e.g.

Key ==> Value

01/01/1900 00:00:00 ==> 41

$logSummary = Get-LogSummary
<!--NeedCopy-->

EXAMPLE 2

Gets a summarised count of completed high level operations logged over two weeks, at daily intervals. The returned log summary collection will contain multiple items; one for each day in the summary date range. - e.g.

Key ==> Value

01/02/2013 14:50:39 ==> 0

02/02/2013 14:50:39 ==> 4

03/02/2013 14:50:39 ==> 21

04/02/2013 14:50:39 ==> 0

05/02/2013 14:50:39 ==> 0

06/02/2013 14:50:39 ==> 0

07/02/2013 14:50:39 ==> 5

08/02/2013 14:50:39 ==> 0

09/02/2013 14:50:39 ==> 0

10/02/2013 14:50:39 ==> 0

11/02/2013 14:50:39 ==> 0

12/02/2013 14:50:39 ==> 7

13/02/2013 14:50:39 ==> 0

14/02/2013 14:50:39 ==> 0

15/02/2013 14:50:39 ==> 12

$daily = 60*60*24
[DateTime]$startRange = "2013-02-01 14:50:39"
[DateTime]$endRange = $startRange.AddDays(14)          
Get-LogSummary -StartDateRange $startRange -EndDateRange $endRange -intervalSeconds $daily
<!--NeedCopy-->

EXAMPLE 3

Gets a summarised count of completed low level operations logged during a day, at hourly intervals. The returned log summary collection will contain multiple items; one for each hour in the summary date range - e.g.

Key ==> Value

04/03/2013 00:00:00 ==> 12

04/03/2013 01:00:00 ==> 10

04/03/2013 02:00:00 ==> 5

.

.

.

04/03/2013 21:00:00 ==> 26

04/03/2013 22:00:00 ==> 0

04/03/2013 23:00:00 ==> 9

$hourly = 60*60
[DateTime]$startRange = "2013-02-03 00:00:00"
[DateTime]$endRange = "2013-02-03 23:59:59"
Get-LogSummary -StartDateRange $startRange -EndDateRange $endRange -intervalSeconds $hourly -GetLowLevelOperations
<!--NeedCopy-->

Parameters

-StartDateRange

Specifies the start of the summary period date range

Type: DateTime
Position: Named
Default value: 1900-01-01 00:00:00
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-EndDateRange

Specifies the end of the summary period date range.

Type: DateTime
Position: Named
Default value: DateTime.UtcNow
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-IntervalSeconds

Specifies the size, in seconds, of each time interval

required within the summary date range. If this is not specified,

is null, zero or exceeds the specified date range, it defaults to the

total number of seconds between EndDateRange and StartDateRange.

Type: Int64
Position: Named
Default value: Total number of seconds in the EndDateRange and StartDateRange time span.
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-GetLowLevelOperations

Specifies if the cmdlet should return low level operation summary counts.

Type: SwitchParameter
Position: Named
Default value: $false - high level operations counts are returned.
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-IncludeIncomplete

Specifies if incomplete operations should be included

in the returned summary counts.

Type: SwitchParameter
Position: Named
Default value: $false - incomplete operations are excluded.
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-OperationType

Specifies the type of logged operations to include.

Values can be ‘AdminActivity’ or ‘ConfigurationChange’

Type: OperationType
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

CitrixCommonParameters

This cmdlet supports the common Citrix parameters: -AdminAddress, -AdminClientIP, -BearerToken, -TraceParent, -TraceState and -VirtualSiteId. For more information, see about_CitrixCommonParameters.

CommonParameters

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

Inputs

None

You can’t pipe objects to this cmdlet.

Outputs

System.Collections.Generic.Dictionary<string, int>

The summary data is returned as a collection of dictionary items. The ‘Key’ value of each dictionary item specifies the start of the time interval within the overall summary date range. The ‘Value’ data in each dictionary item contains the count of operations which were started within that time interval.

Notes

If the specified summary date range and interval period will result in more than 50,000 intervals being returned Get-LogSummary will generate an error and abort the operation.

Get-LogSummary