Remove-Splunk Cmdlet
Deletes Splunk data.
Syntax
Remove-Splunk [parameters]
Remarks
The Remove-Splunk cmdlet allows you to use a syntax similar to SQL DELETE statements to delete Splunk data.
$conn = Connect-Splunk -User 'MyUserName' -Password 'MyPassword' -URL 'MyURL' Remove-Splunk -Connection $conn -Table "DataModels" -Id "1"The Where parameter can also be used to specify the primary key:
Remove-Splunk -Connection $conn -Table "exTablePowershell;" -Where "Id = 1"The primary key can also be passed to the cmdlet along the pipeline:
Select-Splunk -Connection $conn -Table DataModels -Where "Id = 'SampleDataset'" | Remove-Splunk