Functions/Server/Get-BambooCurrentUser.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<#
.SYNOPSIS
    Gets the Current user from the previously set BambooCredentials.
.DESCRIPTION
    If BambooCredentials are not set earlier, this cmdlet fails with an
    unauthorized exception.
.EXAMPLE
    Get-BambooCurrentUser
#>

function Get-BambooCurrentUser {
    [CmdletBinding()]param()

    Invoke-BambooRestMethod -Resource 'currentUser'
}