Cmdlets for WordPress

Build 24.0.9060

Update-Wordpress Cmdlet

Parameters   Output Objects  

Updates WordPress data.

Syntax

Update-Wordpress [parameters]

Remarks

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

$conn = Connect-Wordpress -Url 'http://www.yourwordpresshost.com' -User 'yourUserName' -Password 'yourPassword'
Update-Wordpress -Connection $conn -Table "Categories" -Columns @("Name") -Values @("1668776136772254") -Id "25"
The Where parameter can also be used to specify the primary key of the table:
Update-Wordpress -Connection $conn -Table "Categories" -Columns @("Name") -Values @("1668776136772254") -Where "Id = '25'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-Wordpress -Connection $conn -Table Categories -Where "Id = '1668776136772254'" | Update-Wordpress -Columns @("Id") -Values @("1668776136772254 2")

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