Cmdlets for Splunk

Build 24.0.9060

Update-Splunk Cmdlet

Parameters   Output Objects  

Updates Splunk data.

Syntax

Update-Splunk [parameters]

Remarks

The Update-Splunk cmdlet allows you to use a syntax similar to SQL UPDATE statements to update Splunk data.

$conn = Connect-Splunk -User 'MyUserName' -Password 'MyPassword' -URL 'MyURL'
Update-Splunk -Connection $conn -Table "DataModels" -Columns @("Owner") -Values @("admin") -Id "1"
The Where parameter can also be used to specify the primary key of the table:
Update-Splunk -Connection $conn -Table "DataModels" -Columns @("Owner") -Values @("admin") -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'" | Update-Splunk -Columns @("Id") -Values @("SampleDataset 2")

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