Citrix Virtual Apps and Desktops SDK

Get-BrokerTagUsage

Produces a usage report for one or more tags.

Syntax

Get-BrokerTagUsage
   [[-TagName] <String>]
   [-Property <String[]>]
   [-ReturnTotalRecordCount]
   [-MaxRecordCount <Int32>]
   [-Skip <Int32>]
   [-SortBy <String>]
   [-Filter <String>]
   [-FilterScope <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
Get-BrokerTagUsage
   [-TagUid] <Int32>
   [-Property <String[]>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

Returns one BrokerTagUsage for each input tag. Each BrokerTagUsage object summarizes the tag’s usage throughout the site.

————————– BrokerTagUsage Object

Each BrokerTagUsage object summarizes on the usage of a single Tag.

  • TaggedApplicationGroups (System.Int32)

    The number of application groups that are tagged with this tag and that are visible to the calling delegated administrator.

  • TaggedApplications (System.Int32)

    The number of applications that are tagged with this tag and that are visible to the calling delegated administrator.

  • TaggedCatalogs (System.Int32)

    The number of catalogs that are tagged with this tag and that are visible to the calling delegated administrator.

  • TaggedDesktopGroups (System.Int32)

    The number of desktop groups that are tagged with this tag and that are visible to the calling delegated administrator.

  • TaggedMachines (System.Int32)

    The number of machines that are tagged with this tag and that are visible to the calling delegated administrator.

  • TagName (System.String)

    The name of the Tag.

  • TagRestrictedApplicationGroups (System.Int32)

    The number of application groups that have this tag restriction and that are visible to the calling delegated administrator.

  • TagRestrictedAutoscale (System.Int32)

    The number of desktop groups that have this tag restriction

  • TagRestrictedEntitlementPolicyRules (System.Int32)

    The number of desktop rules in the site’s entitlement policy that have this tag restriction and that are visible to the calling delegated administrator.

  • TagRestrictedRebootSchedules (System.Int32)

    The number of reboot schedules that have this tag restriction.

  • TagUid (System.Int32)

    The Uid of the Tag.

  • TagUUID (System.Guid)

    The UUID associated to the Tag.

  • TotalTaggedObjects (System.Int32)

    The total number of objects that are tagged with this tag.

  • TotalTagRestrictedObjects (System.Int32)

    The total number of objects that have this tag restriction.

  • UnknownTaggedObjects (System.Int32)

    The number of objects of all types that are tagged with this tag and that are *not* visible to the calling delegated administrator.

  • UnknownTagRestrictedObjects (System.Int32)

    The number of objects of all types that have this tag restriction and that are *not* visible to the calling delegated administrator.

Examples

EXAMPLE 1

Reports on the usage of all tags in the site.

Get-BrokerTagUsage
<!--NeedCopy-->

EXAMPLE 2

Reports on the usage of the tag MyTag.

Get-BrokerTagUsage MyTag
<!--NeedCopy-->

Parameters

-TagUid

Report on the tag identified by TagUid.

Type: Int32
Position: 2
Default value: None
Required: True
Accept pipeline input: False
Accept wildcard characters: False

-TagName

Report on the tag identified by TagName.

Type: String
Position: 2
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: True

-ReturnTotalRecordCount

When specified, this causes the cmdlet to output an error record containing the number of records available. This error record is additional information and does not affect the objects written to the output pipeline. See about_Broker_Filtering for details.

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

-MaxRecordCount

Specifies the maximum number of records to return.

Type: Int32
Position: Named
Default value: 250
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Skip

Skips the specified number of records before returning results. Also reduces the count returned by -ReturnTotalRecordCount.

Type: Int32
Position: Named
Default value: 0
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SortBy

Sorts the results by the specified list of properties. The list is a set of property names separated by commas, semi-colons, or spaces. Optionally, prefix each name with a + or - to indicate ascending or descending order. Ascending order is assumed if no prefix is present.

Type: String
Position: Named
Default value: The default sort order is by name or unique identifier.
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Filter

Gets records that match a PowerShell style filter expression. See about_Broker_Filtering for details.

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

-FilterScope

Gets only results allowed by the specified scope id.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
Introduced in: Citrix Virtual Apps and Desktop 7 2106

-Property

Specifies the properties to be returned. This is similar to piping the output of the command through Select-Object, but the properties are filtered more efficiently at the server.

Type: String[]
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

Input cannot be piped to this cmdlet.

Outputs

Citrix.Broker.Admin.SDK.TagUsage

Summarizes the usage of a single tag.

Notes

If a tag is applied to an object, but that object would not be visible to the calling delegated administrator via the corresponding Get-Broker* cmdlet, then the object is not counted as an object of that type, but is instead reported as an ‘unknown’ object.

For example, suppose that the caller has invoked Get-BrokerTagUsage MyTag, and that there are three desktop groups and no other objects tagged with MyTag. Two of the desktop groups are visible to the caller, but the other is not. In this case, TotalTaggedObjects is 3, TaggedDesktopGroups is 2, and UnknownTaggedObjects is 1.

Get-BrokerTagUsage