Disconnect-ERP

Disconnects from a ERP system.

Syntax

Disconnect-ERP  [[-Service] <Uri>] [<CommonParameters>]

Parameters

Type

Name

Description

Optional

Url

Service

URL to the service that should be disconnected.

yes

Return type

empty ← On failure the Exception/ErrorMessage can be accessed using $Error.

Remarks

The cmdlet can be invoked without arguments to disconnect all connected ErpServices.
Afterwards they are no longer available in the current session.

Alternatively, the -URL parameter can be used to disconnect individual services by specifying the URL of the respective service.
If it is a Catalog Service ( or SAP systems), the connection to this service and all the contained services are automatically disconnected.

Examples

In the following examples we are using public OData Services (http://services.odata.org) for demonstration purposes:

Disconnect all connected Services

Disconnect-ERP

Disconnect the NorthwindService

Disconnect-ERP -Service "http://services.odata.org/V4/Northwind/Northwind.svc"

Disconnect all not available services

(Get-ERPServices) | where { -not $_.Available } | foreach { Disconnect-ERP -Service $_.Url}