< Back

Get-CitrixMonitorServiceData

Mon Jan 13, 2020 2:23 am

NAME Get-CitrixMonitorServiceData



SYNOPSIS

Returns Citrix Virtual Apps and Desktops usage data over a period of time.





SYNTAX

Get-CitrixMonitorServiceData [-DeliveryControllers] <String[]> [-Credential <PSCredential>] [-StartDate

<DateTime>] [-EndDate <DateTime>] [<CommonParameters>]





DESCRIPTION

The Get-CitrixMonitorServiceData cmdlet returns an object with usage data (sessions, number of virtual

machines) of a Citrix Virtual Apps and Desktops Site over an specified period of time.



This cmdlet takes a required parameter: a list of Citrix Virtual Apps and Desktops Delivery Controllers.

Without any other parameters, it will use the current user to connect to the DDCs and collect usage information

for the past day.



It will return a custom object with session, user, login times and number of VMs for every Delivery Group

present on the selected Site.



Additional filters can be applied to select a different date range.





PARAMETERS

-DeliveryControllers <String[]>

Specifies a single Citrix Virtual Apps and Desktops Delivery Controller or an array of Citrix DDCs from

different Sites to collect data from.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Credential <PSCredential>

Specifies a user account that has permission to send the request. The default is the current user. A minimum of

read-only administrator permissions on Citrix Virtual Apps and Desktops are required to collect this data.



Enter a PSCredential object, such as one generated by the Get-Credential cmdlet.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-StartDate <DateTime>

Specifies the start date for the report in yyyy-MM-ddTHH:mm:ss format. If you omit the time part, 00:00:00 will

be automatically appended to the date.



The default value is yesterday's date, midnight.



Required? false

Position? named

Default value "$(Get-Date (Get-Date).AddDays(-1) -Format 'yyyy-MM-ddT00:00:00')"

Accept pipeline input? false

Accept wildcard characters? false



-EndDate <DateTime>

Specifies the end date for the report in yyyy-MM-ddTHH:mm:ss format. If you omit the time part, 23:59:59 will

be automatically appended to the date.



The default value if no start date is specified is yesterday's date, 23:59:59.

If a start date is specified but no end date is provided, the end date will automatically be set 23 hours,

59 minutes and 59 seconds after the start date.



Required? false

Position? named

Default value "$(Get-Date $StartDate.AddSeconds(86399) -Format 'yyyy-MM-ddTHH:mm:ss')"

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



OUTPUTS

citrix-odata.CitrixMonitorServiceData





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-CitrixMonitorServiceData -DeliveryControllers @('myddc01.example.com', 'myddc02.example.com')

-Credential $(Get-Credential)



Example 1: Get the usage data for the past day

Returns the usage data for all Delivery Groups present on myddc01 and myddc02 Delivery Controllers using the

specified credentials. The returned custom object will contain yesterday's usage data.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-CitrixMonitorServiceData -DeliveryControllers 'myddc01.example.com' -StartDate '2019-08-01T00:00:00'

-EndDate '2019-08-31T23:59:59'



Example 2: Get the usage data for the month of August

Returns the usage data for all Delivery Groups present on myddc01 using the credentials of the current user.

The returned custom object will contain the usage data for the month of August 2019.











RELATED LINKS

https://github.com/karjona/citrix-odata