Public/Get-bConnectEndpointSecret.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
Function Get-bConnectEndpointSecret() {
    <#
        .Synopsis
            Get disk encryption information for specified endpoint.
        .Parameter EndpointId
            Valid GUID of an endpoint.
        .Outputs
            Array of EndpointSecrets (see bConnect documentation for more details).
    #>


    Param (
        [Parameter(Mandatory=$true)][string]$EndpointGuid
    )

    $_connectVersion = Get-bConnectVersion
    If($_connectVersion -ge "1.0") {
        $_body = @{
            EndpointId = $EndpointGuid
        }

        return Invoke-bConnectGet -Controller "EndpointSecrets" -Version $_connectVersion -Data $_body
    } else {
        return $false
    }
}