Get-FasMetric

Synopsis

Gets a read-only metrics snapshot from the local FAS server.

Syntax

Get-FasMetric [<CommonParameters>]
<!--NeedCopy-->

Description

This cmdlet returns a read-only metrics snapshot from the Federated Authentication Service (FAS) server on the local machine. The snapshot covers the RA certificates held by the server, the current configuration of the FAS RA Certificate Monitor, the state of the server’s connection to Citrix Cloud, and whether each configured certificate authority is currently reachable.

For each RA certificate, the snapshot includes the subject, issuer, thumbprint, the dates between which the certificate is valid, and the number of days remaining before it expires. Each certificate is also reported as healthy, expiring, or expired, so that you can renew a certificate before it lapses and interrupts user logons. The inventory lists every RA certificate, including those that are healthy.

Unlike most FAS cmdlets, this cmdlet has no Address parameter. It always reads from the FAS server on the machine it is run on; targeting a remote server is not supported by design. The metrics are exposed through a read-only endpoint that, unlike the administrator-gated FAS administration endpoints, is reachable by the local NETWORK SERVICE account, so local administrator rights are not required to run this cmdlet.

The following fields are returned:

  • SchemaVersion: the version of the metrics schema, currently 1.3
  • GeneratedUtc: the UTC time at which the snapshot was generated
  • ServerName: the name of the local FAS server
  • Version: the version of the FAS server
  • MaintenanceMode: whether the FAS server is in maintenance mode
  • CloudEnabled: whether the FAS server is configured for Citrix Cloud
  • CloudRegistered: whether the FAS server is registered with Citrix Cloud
  • CloudConnected: whether the cloud messaging channel is currently connected
  • CloudLastContactUtc: the UTC time of the last successful FasHub call. This reports a different channel from CloudConnected: CloudConnected is the messaging channel, whereas CloudLastContactUtc reflects the last successful FasHub call
  • RaCertMonitorEnabled: whether the FAS RA Certificate Monitor is enabled
  • RaCertCheckIntervalSecs: how often the monitor checks the RA certificates, in seconds
  • RaCertWarningThresholdDays: how close to expiry, in days, an RA certificate must be before a warning is raised
  • RaCertAlertCount: the number of RA certificates currently reported as expiring or expired
  • RaCerts: the full RA certificate inventory, including healthy certificates. Each entry includes Subject, Issuer, Thumbprint, NotBefore, NotAfter, DaysLeft and State
  • CaConnectivity: the reachability of each configured certificate authority
  • ReadErrors: any non-fatal failures encountered while reading the metrics. An empty list means every source was read cleanly

See Set-FasRaCertificateMonitor for information about the FAS RA Certificate Monitor and its configuration.

Examples

Example 1

PS C:\>

C:\PS> Get-FasMetric
<!--NeedCopy-->

Description


This code gets a read-only metrics snapshot from the local FAS server.

Example 2

PS C:\>

C:\PS> Get-FasMetric | ConvertTo-Json -Depth 5
<!--NeedCopy-->

Description


This code gets a read-only metrics snapshot from the local FAS server and renders it as JSON.

Example 3

PS C:\>

C:\PS> (Get-FasMetric).RaCerts | Format-Table Subject, State, DaysLeft
<!--NeedCopy-->

Description


This code lists each RA certificate with its expiry state and the number of days left before it expires.

Parameters

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

This cmdlet does not accept input.

Outputs

FasMetric

This cmdlet returns a FasMetric object holding a read-only metrics snapshot of the local FAS server, as described above.

Notes

Get-FasRaCertificateMonitor

Set-FasRaCertificateMonitor

Reset-FasRaCertificateMonitor

Get-FasMetric