powergate:code_reference:commandlets:disconnect-erp

Disconnect-ERP

Disconnects from a ERP - System.

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

TypeNameDescriptionOptional
UriServiceUrl to the service that should be disconnected.
If the argument is an Uri to a CatalogService, the CatalogService and all its known services get disconnected
yes

empty

Disconnects from ERP-System(s).
By calling Disconnect-ERP with no arguments, all connections are destroyed and freed.

In the following examples we are using the 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}