Modules/Set-VstsConnection.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
function Set-VstsConnection {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true)]
        [string]$instanceName,
        [Parameter(Mandatory = $true)]
        [string]$projectName,
        [Parameter(Mandatory = $true)]
        [string]$accessToken
    )
    [System.Environment]::SetEnvironmentVariable("Vsts-InstanceName", $instanceName, "User")
    [System.Environment]::SetEnvironmentVariable("Vsts-ProjectName", $projectName, "User")
    [System.Environment]::SetEnvironmentVariable("Vsts-AccessToken", $accessToken, "User")
}