Public/Get-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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
Function Get-bConnectApplication() { <# .Synopsis Get specified application, all applications in given OrgUnit or all applications on an specific endpoint. .Parameter ApplicationGuid Valid GUID of a application. .Parameter OrgUnitGuid Valid GUID of a Orgunit. .Parameter EndpointGuid Valid GUID of an endpoint. .Outputs Array of Application (see bConnect documentation for more details). #> Param ( [string]$ApplicationGuid, [string]$OrgUnitGuid, [string]$EndpointGuid ) $_connectVersion = Get-bConnectVersion If($_connectVersion -ge "1.0") { If($EndpointGuid) { $_body = @{ EndpointId = $EndpointGuid } } If($OrgUnitGuid) { $_body = @{ OrgUnit = $OrgUnitGuid } } If($ApplicationGuid) { $_body = @{ Id = $ApplicationGuid } } return Invoke-bConnectGet -Controller "Applications" -Version $_connectVersion -Data $_body } else { return $false } } |