# Disconnect-ERP Disconnects from a ERP system. ## Syntax ```powershell Disconnect-ERP [[-Service] ] [] ``` ## 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* ([powerGateServer]() 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 () for demonstration purposes: **Disconnect all connected Services** ```powershell Disconnect-ERP ``` **Disconnect the NorthwindService** ```powershell Disconnect-ERP -Service "http://services.odata.org/V4/Northwind/Northwind.svc" ``` **Disconnect all not available services** ```powershell (Get-ERPServices) | where { -not $_.Available } | foreach { Disconnect-ERP -Service $_.Url} ```