Public/Edit-bConnectApplication.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
Function Edit-bConnectApplication() {
    <#
        .Synopsis
            Create a new application.
        .Parameter Application
            Application object (hashtable).
        .Outputs
            NewEndpoint (see bConnect documentation for more details).
    #>



    Param (
        [Parameter(Mandatory=$true)][PSCustomObject]$Application
    )

    If($Application.AUT.Count -gt 0) {
        $Application.EnableAUT = $true
    }


    $_connectVersion = Get-bConnectVersion
    If($_connectVersion -ge "1.0") {
        $_Application = ConvertTo-Hashtable $Application
        return Invoke-bConnectPatch -Controller "Applications" -Version $_connectVersion -objectGuid $_Application.Id -Data $_Application
    } else {
        return $false
    }
}