Functions/Public/identity/Get-vRAVersion.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function Get-vRAVersion {
<#
    .SYNOPSIS
    Retrieve vRA version information
    
    .DESCRIPTION
    Retrieve vRA version information

    .OUTPUTS
    System.Management.Automation.PSObject.

    .EXAMPLE
    Get-vRAVersion
    
#>

[CmdletBinding()][OutputType('System.Management.Automation.PSObject')]

    Param ()
                
    try {
    
        $URI = "/identity/api/about"
        $Response = Invoke-vRARestMethod -URI $URI -Method GET

        [pscustomobject] @{

            BuildNumber = $Response.buildNumber
            BuildDate = $Response.buildDate
            ProductVersion = $Response.productVersion
            APIVersion = $Response.apiVersion
            ProductBuildNumber = $Response.productBuildNumber

        }

    }
    catch [Exception]{

        throw
    }
}