Public/Get-JenkinsUserFullName.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
. "$PSScriptRoot\..\Private\Get-JenkinsUserInfo.ps1" function Get-JenkinsUserFullName { [CmdletBinding()] param ( [ValidateNotNullOrEmpty()] [String] $UsernameToLookup = "me", [String] $Username = $script:apiUsername, [SecureString] $Password = $script:apiPassword ) $userInfo = Get-JenkinsUserInfo -Username $Username -Password $Password -UsernameToLookup $UsernameToLookup $fullName = if ($null -ne $userInfo) { $userInfo.fullName } else { $null } return $fullName } |