Remove-OData Cmdlet
Deletes OData data.
Syntax
Remove-OData [parameters]
Remarks
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 "exTablePowershell;" -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