table of contents | full
NAME
Find-VstsMatch
SYNOPSIS
Finds files using match patterns.
SYNTAX
Find-VstsMatch [[-DefaultRoot] <String>] [[-Pattern] <String[]>] [[-FindOptions] <Object>]
[[-MatchOptions] <Object>] [<CommonParameters>]
DESCRIPTION
Determines the find root from a list of patterns. Performs the find and then applies the glob patterns.
Supports interleaved exclude patterns. Unrooted patterns are rooted using defaultRoot, unless
matchOptions.matchBase is specified and the pattern is a basename only. For matchBase cases, the
defaultRoot is used as the find root.
table of contents | full
NAME
New-VstsFindOptions
SYNOPSIS
Creates FindOptions for use with Find-VstsMatch.
SYNTAX
New-VstsFindOptions [-FollowSpecifiedSymbolicLink] [-FollowSymbolicLinks] [<CommonParameters>]
DESCRIPTION
Creates FindOptions for use with Find-VstsMatch. Contains switches to control whether to follow symlinks.
table of contents | full
NAME
New-VstsMatchOptions
SYNOPSIS
Creates MatchOptions for use with Find-VstsMatch and Select-VstsMatch.
SYNTAX
New-VstsMatchOptions [-Dot] [-FlipNegate] [-MatchBase] [-NoBrace] [-NoCase] [-NoComment] [-NoExt]
[-NoGlobStar] [-NoNegate] [-NoNull] [<CommonParameters>]
DESCRIPTION
Creates MatchOptions for use with Find-VstsMatch and Select-VstsMatch. Contains switches to control which
pattern matching options are applied.
table of contents | full
NAME
Select-VstsMatch
SYNOPSIS
Applies match patterns against a list of files.
SYNTAX
Select-VstsMatch [[-ItemPath] <String[]>] [[-Pattern] <String[]>] [[-PatternRoot] <String>] [[-Options]
<Object>] [<CommonParameters>]
DESCRIPTION
Applies match patterns to a list of paths. Supports interleaved exclude patterns.
table of contents | full
NAME
Get-VstsEndpoint
SYNOPSIS
Gets an endpoint.
SYNTAX
Get-VstsEndpoint [-Name] <String> [-Require] [<CommonParameters>]
DESCRIPTION
Gets an endpoint object for the specified endpoint name. The endpoint is returned as an object with three
properties: Auth, Data, and Url.
The Data property requires a 1.97 agent or higher.
table of contents | full
NAME
Get-VstsInput
SYNOPSIS
Gets an input.
SYNTAX
Get-VstsInput -Name <String> [-Require] [-AsBool] [-AsInt] [<CommonParameters>]
Get-VstsInput -Name <String> [-Default <Object>] [-AsBool] [-AsInt] [<CommonParameters>]
DESCRIPTION
Gets the value for the specified input name.
table of contents | full
NAME
Get-VstsSecureFileName
SYNOPSIS
Gets a secure file name.
SYNTAX
Get-VstsSecureFileName [-Id] <String> [-Require] [<CommonParameters>]
DESCRIPTION
Gets the name for a secure file.
table of contents | full
NAME
Get-VstsSecureFileTicket
SYNOPSIS
Gets a secure file ticket.
SYNTAX
Get-VstsSecureFileTicket [-Id] <String> [-Require] [<CommonParameters>]
DESCRIPTION
Gets the secure file ticket that can be used to download the secure file contents.
table of contents | full
NAME
Get-VstsTaskVariable
SYNOPSIS
Gets a task variable.
SYNTAX
Get-VstsTaskVariable -Name <String> [-Require] [-AsBool] [-AsInt] [<CommonParameters>]
Get-VstsTaskVariable -Name <String> [-Default <Object>] [-AsBool] [-AsInt] [<CommonParameters>]
DESCRIPTION
Gets the value for the specified task variable.
table of contents | full
NAME
Get-VstsTaskVariableInfo
SYNOPSIS
Gets all job variables available to the task. Requires 2.104.1 agent or higher.
SYNTAX
Get-VstsTaskVariableInfo [<CommonParameters>]
DESCRIPTION
Gets a snapshot of the current state of all job variables available to the task.
Requires a 2.104.1 agent or higher for full functionality.
Returns an array of objects with the following properties:
[string]Name
[string]Value
[bool]Secret
Limitations on an agent prior to 2.104.1:
1) The return value does not include all public variables. Only public variables
that have been added using setVariable are returned.
2) The name returned for each secret variable is the formatted environment variable
name, not the actual variable name (unless it was set explicitly at runtime using
setVariable).
table of contents | full
NAME
Set-VstsTaskVariable
SYNOPSIS
Sets a task variable.
SYNTAX
Set-VstsTaskVariable [-Name] <String> [[-Value] <String>] [-Secret] [<CommonParameters>]
DESCRIPTION
Sets a task variable in the current task context as well as in the current job context. This allows the
task variable to retrieved by subsequent tasks within the same job.
table of contents | full
NAME
Find-VstsFiles
SYNOPSIS
Finds files or directories.
SYNTAX
Find-VstsFiles [[-LiteralDirectory] <String>] [-LegacyPattern] <String> [-IncludeFiles]
[-IncludeDirectories] [-Force] [<CommonParameters>]
DESCRIPTION
Finds files or directories using advanced pattern matching.
table of contents | full
NAME
Get-VstsLocString
SYNOPSIS
Gets a localized resource string.
SYNTAX
Get-VstsLocString [-Key] <String> [[-ArgumentList] <Object[]>] [<CommonParameters>]
DESCRIPTION
Gets a localized resource string and optionally formats the string with arguments.
If the format fails (due to a bad format string or incorrect expected arguments in the format string),
then the format string is returned followed by each of the arguments (delimited by a space).
If the lookup key is not found, then the lookup key is returned followed by each of the arguments
(delimited by a space).
table of contents | full
NAME
Import-VstsLocStrings
SYNOPSIS
Imports resource strings for use with GetVstsLocString.
SYNTAX
Import-VstsLocStrings [-LiteralPath] <String> [<CommonParameters>]
DESCRIPTION
Imports resource strings for use with GetVstsLocString. The imported strings are stored in an internal
resource string dictionary. Optionally, if a separate resource file for the current culture exists, then
the localized strings from that file then imported (overlaid) into the same internal resource string
dictionary.
Resource strings from the SDK are prefixed with "PSLIB_". This prefix should be avoided for custom
resource strings.
table of contents | full
NAME
Write-VstsAddAttachment
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsAddAttachment [-Type] <String> [-Name] <String> [-Path] <String> [-AsOutput]
[<CommonParameters>]
table of contents | full
NAME
Write-VstsAddBuildTag
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsAddBuildTag [-Value] <String> [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsAssociateArtifact
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsAssociateArtifact [-Name] <String> [-Path] <String> [-Type] <String> [[-Properties]
<Hashtable>] [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsLogDetail
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsLogDetail [-Id] <Guid> [[-ParentId] <Object>] [[-Type] <String>] [[-Name] <String>] [[-Order]
<Object>] [[-StartTime] <Object>] [[-FinishTime] <Object>] [[-Progress] <Object>] [[-State] <Object>]
[[-Result] <Object>] [[-Message] <String>] [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsLoggingCommand
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsLoggingCommand -Area <String> -Event <String> [-Data <String>] [-Properties <Hashtable>]
[-AsOutput] [<CommonParameters>]
Write-VstsLoggingCommand -Command <Object> [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsPrependPath
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsPrependPath [-Path] <String> [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsSetEndpoint
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsSetEndpoint [-Id] <String> [-Field] <String> [-Key] <String> [-Value] <String> [-AsOutput]
[<CommonParameters>]
table of contents | full
NAME
Write-VstsSetProgress
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsSetProgress [-Percent] <Int32> [[-CurrentOperation] <String>] [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsSetResult
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsSetResult -Result <String> [-Message <String>] [-AsOutput] [<CommonParameters>]
Write-VstsSetResult -Result <String> [-Message <String>] [-DoNotThrow] [<CommonParameters>]
table of contents | full
NAME
Write-VstsSetSecret
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsSetSecret [-Value] <String> [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsSetVariable
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsSetVariable [-Name] <String> [[-Value] <String>] [-Secret] [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsTaskDebug
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsTaskDebug [[-Message] <String>] [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsTaskError
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsTaskError [[-Message] <String>] [[-ErrCode] <String>] [[-SourcePath] <String>] [[-LineNumber]
<String>] [[-ColumnNumber] <String>] [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsTaskVerbose
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsTaskVerbose [[-Message] <String>] [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsTaskWarning
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsTaskWarning [[-Message] <String>] [[-ErrCode] <String>] [[-SourcePath] <String>] [[-LineNumber]
<String>] [[-ColumnNumber] <String>] [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsUpdateBuildNumber
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsUpdateBuildNumber [-Value] <String> [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsUpdateReleaseName
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsUpdateReleaseName [-Name] <String> [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsUploadArtifact
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsUploadArtifact [-ContainerFolder] <String> [-Name] <String> [-Path] <String> [-AsOutput]
[<CommonParameters>]
table of contents | full
NAME
Write-VstsUploadBuildLog
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsUploadBuildLog [-Path] <String> [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsUploadFile
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsUploadFile [-Path] <String> [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Write-VstsUploadSummary
SYNOPSIS
See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md
SYNTAX
Write-VstsUploadSummary [-Path] <String> [-AsOutput] [<CommonParameters>]
table of contents | full
NAME
Get-VstsAssemblyReference
SYNOPSIS
Gets assembly reference information.
SYNTAX
Get-VstsAssemblyReference [-LiteralPath] <String> [<CommonParameters>]
DESCRIPTION
Not supported for use during task execution. This function is only intended to help developers resolve
the minimal set of DLLs that need to be bundled when consuming the VSTS REST SDK or TFS Extended Client
SDK. The interface and output may change between patch releases of the VSTS Task SDK.
Only a subset of the referenced assemblies may actually be required, depending on the functionality used
by your task. It is best to bundle only the DLLs required for your scenario.
Walks an assembly's references to determine all of it's dependencies. Also walks the references of the
dependencies, and so on until all nested dependencies have been traversed. Dependencies are searched for
in the directory of the specified assembly. NET Framework assemblies are omitted.
See https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for
reliable usage when working with the TFS extended client SDK from a task.
table of contents | full
NAME
Get-VstsClientCertificate
SYNOPSIS
Gets a client certificate for current connected TFS instance
SYNTAX
Get-VstsClientCertificate [<CommonParameters>]
DESCRIPTION
Gets an instance of a X509Certificate2 that is the client certificate Build/Release agent used.
table of contents | full
NAME
Get-VstsTfsClientCredentials
SYNOPSIS
Gets a credentials object that can be used with the TFS extended client SDK.
SYNTAX
Get-VstsTfsClientCredentials [[-OMDirectory] <String>] [<CommonParameters>]
DESCRIPTION
The agent job token is used to construct the credentials object. The identity associated with the token
depends on the scope selected in the build/release definition (either the project collection
build/release service identity, or the project build/release service identity).
Refer to Get-VstsTfsService for a more simple to get a TFS service object.
*** DO NOT USE Agent.ServerOMDirectory *** See
https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable
usage when working with the TFS extended client SDK from a task.
table of contents | full
NAME
Get-VstsTfsService
SYNOPSIS
Gets a TFS extended client service.
SYNTAX
Get-VstsTfsService [-TypeName] <String> [[-OMDirectory] <String>] [[-Uri] <String>]
[[-TfsClientCredentials] <Object>] [<CommonParameters>]
DESCRIPTION
Gets an instance of an ITfsTeamProjectCollectionObject.
*** DO NOT USE Agent.ServerOMDirectory *** See
https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable
usage when working with the TFS extended client SDK from a task.
table of contents | full
NAME
Get-VstsVssCredentials
SYNOPSIS
Gets a credentials object that can be used with the VSTS REST SDK.
SYNTAX
Get-VstsVssCredentials [[-OMDirectory] <String>] [<CommonParameters>]
DESCRIPTION
The agent job token is used to construct the credentials object. The identity associated with the token
depends on the scope selected in the build/release definition (either the project collection
build/release service identity, or the project service build/release identity).
Refer to Get-VstsVssHttpClient for a more simple to get a VSS HTTP client.
*** DO NOT USE Agent.ServerOMDirectory *** See
https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable
usage when working with the VSTS REST SDK from a task.
table of contents | full
NAME
Get-VstsVssHttpClient
SYNOPSIS
Gets a VSS HTTP client.
SYNTAX
Get-VstsVssHttpClient [-TypeName] <String> [[-OMDirectory] <String>] [[-Uri] <String>] [[-VssCredentials]
<Object>] [[-WebProxy] <Object>] [[-ClientCert] <Object>] [-IgnoreSslError] [<CommonParameters>]
DESCRIPTION
Gets an instance of an VSS HTTP client.
*** DO NOT USE Agent.ServerOMDirectory *** See
https://github.com/Microsoft/azure-pipelines-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable
usage when working with the VSTS REST SDK from a task.
table of contents | full
NAME
Get-VstsWebProxy
SYNOPSIS
Gets a VstsTaskSdk.VstsWebProxy
SYNTAX
Get-VstsWebProxy [<CommonParameters>]
DESCRIPTION
Gets an instance of a VstsTaskSdk.VstsWebProxy that has same proxy configuration as Build/Release agent.
VstsTaskSdk.VstsWebProxy implement System.Net.IWebProxy interface.
table of contents | full
NAME
Assert-VstsAgent
SYNOPSIS
Asserts the agent version is at least the specified minimum.
SYNTAX
Assert-VstsAgent [-Minimum] <Version> [<CommonParameters>]
table of contents | full
NAME
Assert-VstsPath
SYNOPSIS
Asserts that a path exists. Throws if the path does not exist.
SYNTAX
Assert-VstsPath [-LiteralPath] <String> [[-PathType] {Any | Container | Leaf}] [-PassThru]
[<CommonParameters>]
table of contents | full
NAME
Invoke-VstsProcess
SYNOPSIS
Executes an external program as a child process.
SYNTAX
Invoke-VstsProcess [-FileName] <String> [[-Arguments] <String>] [[-WorkingDirectory] <String>]
[[-StdOutPath] <String>] [[-StdErrPath] <String>] [-RequireExitCodeZero] [<CommonParameters>]
DESCRIPTION
Executes an external program and waits for the process to exit.
After calling this command, the exit code of the process can be retrieved from the variable $LASTEXITCODE
or from the pipe.
table of contents | full
NAME
Invoke-VstsTool
SYNOPSIS
Executes an external program.
SYNTAX
Invoke-VstsTool [-FileName] <String> [[-Arguments] <String>] [[-WorkingDirectory] <String>] [[-Encoding]
<Encoding>] [-RequireExitCodeZero] [[-IgnoreHostException] <Boolean>] [<CommonParameters>]
DESCRIPTION
Executes an external program and waits for the process to exit.
After calling this command, the exit code of the process can be retrieved from the variable $LASTEXITCODE.
table of contents | full
NAME
Trace-VstsEnteringInvocation
SYNOPSIS
Writes verbose information about the invocation being entered.
SYNTAX
Trace-VstsEnteringInvocation [-InvocationInfo] <InvocationInfo> [[-Parameter] <String[]>]
[<CommonParameters>]
DESCRIPTION
Used to trace verbose information when entering a function/script. Writes an entering message followed by
a short description of the invocation. Additionally each bound parameter and unbound argument is also
traced.
table of contents | full
NAME
Trace-VstsLeavingInvocation
SYNOPSIS
Writes verbose information about the invocation being left.
SYNTAX
Trace-VstsLeavingInvocation [-InvocationInfo] <InvocationInfo> [<CommonParameters>]
DESCRIPTION
Used to trace verbose information when leaving a function/script. Writes a leaving message followed by a
short description of the invocation.
table of contents | full
NAME
Trace-VstsPath
SYNOPSIS
Writes verbose information about paths.
SYNTAX
Trace-VstsPath [[-Path] <String[]>] [-PassThru] [<CommonParameters>]
DESCRIPTION
Writes verbose information about the paths. The paths are sorted and a the common root is written only
once, followed by each relative path.