Cmdlets for OData

Build 20.0.7654

Remove-OData Cmdlet

Parameters   Output Objects  

Deletes OData data.


Remove-OData [parameters]


The Remove-OData cmdlet allows you to use a syntax similar to SQL DELETE statements to delete OData data.

$conn = Connect-OData -User 'MyUser' -Password 'MyPassword' -URL 'http://myserver/myOrgRoot'
Remove-OData -Connection $conn -Table "Lead" -Id "1045625d-99ee-e011-a272-00155d01ad6b"
The Where parameter can also be used to specify the primary key:
Remove-OData -Connection $conn -Table "exTable;" -Where "Id = 1045625d-99ee-e011-a272-00155d01ad6b"
The primary key can also be passed to the cmdlet along the pipeline:
Select-OData -Connection $conn -Table Lead -Where "FirstName = 'Bartholomew'" | Remove-OData

Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 20.0.7654