Cmdlets for Elasticsearch

Build 25.0.9434

Remove-Elasticsearch Cmdlet

Parameters   Output Objects  

Deletes Elasticsearch data.

Syntax

Remove-Elasticsearch [parameters]

Remarks

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

$conn = Connect-Elasticsearch -Server '127.0.0.1' -Port 9200
Remove-Elasticsearch -Connection $conn -Table "[CData].[Elasticsearch].Employee" -Id "1"
The Where parameter can also be used to specify the primary key:
Remove-Elasticsearch -Connection $conn -Table "exTablePowershell;" -Where "Id = 1"
The primary key can also be passed to the cmdlet along the pipeline:
Select-Elasticsearch -Connection $conn -Table [CData].[Elasticsearch].Employee -Where "Industry = 'Floppy Disks'" | Remove-Elasticsearch

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434