Functions/Server/Set-BambooServer.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<#
.SYNOPSIS
    Sets the target Bamboo Server
.DESCRIPTION
    All further cmdlets from PsBamboo will be executed against the server-enpoint
    specified by this cmdlet.
.PARAMETER Url
    Mandatory - Fully qualified HTTP endpoint for the target Bamboo Server.
.EXAMPLE
    Set-BambooServer -Url "http://localhost:8085"
#>

function Set-BambooServer {
    param(
        [Parameter(Mandatory)]
        [ValidatePattern('^(https?:\/\/)([\w\.-]+)(:\d+)*\/*')]
        [string]$Url
    )
    $script:BambooServer = $Url
}