Cmdlets for Xero

Build 24.0.9060

Update-Xero Cmdlet

Parameters   Output Objects  

Updates Xero data.

Syntax

Update-Xero [parameters]

Remarks

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

$conn = Connect-Xero
Update-Xero -Connection $conn -Table "Contacts" -Columns @("Name") -Values @("John Doe") -Id "c27221d7-8290-4204-9f3d-0cfb7c5a3d6f"
The Where parameter can also be used to specify the primary key of the table:
Update-Xero -Connection $conn -Table "Contacts" -Columns @("Name") -Values @("John Doe") -Where "ContactId = 'c27221d7-8290-4204-9f3d-0cfb7c5a3d6f'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-Xero -Connection $conn -Table Contacts -Where "ContactStatus = 'ACTIVE'" | Update-Xero -Columns @("ContactStatus") -Values @("ACTIVE 2")

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