Cmdlets for Azure Cosmos DB

Build 24.0.9060

Remove-CosmosDB Cmdlet

Parameters   Output Objects  

Deletes Azure Cosmos DB data.

Syntax

Remove-CosmosDB [parameters]

Remarks

The Remove-CosmosDB cmdlet allows you to use a syntax similar to SQL DELETE statements to delete Azure Cosmos DB data.

$conn = Connect-CosmosDB -AccountEndpoint "myAccountEndpoint" -AccountKey "myAccountKey"
Remove-CosmosDB -Connection $conn -Table "[CData].[Entities].Customers" -Id "22"
The Where parameter can also be used to specify the primary key:
Remove-CosmosDB -Connection $conn -Table "exTablePowershell;" -Where "_id = 22"
The primary key can also be passed to the cmdlet along the pipeline:
Select-CosmosDB -Connection $conn -Table [CData].[Entities].Customers -Where "Country = 'US'" | Remove-CosmosDB

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060