Skip to content

Send TFSBuildMetric

AzureDevOps edited this page Sep 25, 2026 · 1 revision

Send-TFSBuildMetric

SYNOPSIS

Sends TFS Build metrics to Influx.

SYNTAX

Send-TFSBuildMetric [[-Measure] <String>] [[-Tags] <String[]>] [[-Top] <Int32>] [-Latest]
 [-TFSRootURL] <String> [-TFSCollection] <String> [-TFSProject] <String> [[-Database] <String>]
 [[-Server] <String>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

This function requires the TFS module (install via Install-Module TFS).

EXAMPLES

EXAMPLE 1

Send-TFSBuildMetric -Measure 'TestTFS' -Tags Name,Author -TFSRootURL https://localhost:8088/tfs -TFSCollection MyCollection -TFSProject MyProject

Description

This command will submit the specified tags and Build metrics to a measure called 'TestTFS'.

PARAMETERS

-Measure

The name of the measure to be updated or created.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: TFSBuild
Accept pipeline input: False
Accept wildcard characters: False

-Tags

An array of Build definition properties to be included, from those returned by Get-TfsBuildDefinitions.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: ('Definition', 'Id', 'Result')
Accept pipeline input: False
Accept wildcard characters: False

-Top

An integer defining the number of most recent builds to return. Default: 100.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: 100
Accept pipeline input: False
Accept wildcard characters: False

-Latest

Switch parameter. When used returns only the most recent build for each distinct definition.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-TFSRootURL

The root URL for TFS, e.g https://yourserver.yoursite.com/TFS

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TFSCollection

The name of the TFS collection to query.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TFSProject

The name of the TFS project to query.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database

The name of the Influx database to write to. Default: 'TFS'. This must exist in Influx!

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: Tfs
Accept pipeline input: False
Accept wildcard characters: False

-Server

The URL and port for the Influx REST API. Default: 'http://localhost:8086'

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Default value: Http://localhost:8086
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-ProgressAction

{{Fill ProgressAction Description}}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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

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 (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Clone this wiki locally