Remove-CosmosDB Cmdlet
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