Update-XML Cmdlet
Updates XML data.
Syntax
Update-XML [parameters]
Remarks
The Update-XML cmdlet allows you to use a syntax similar to SQL UPDATE statements to update XML data.
$conn = Connect-XML -URI 'C:\people.xml' -DataModel 'Relational' Update-XML -Connection $conn -Table "NorthwindOData" -Columns @("Username") -Values @("Ana Trujilo") -Id "1"The Where parameter can also be used to specify the primary key of the table:
Update-XML -Connection $conn -Table "NorthwindOData" -Columns @("Username") -Values @("Ana Trujilo") -Where "Id = '1'"The primary key can also be passed to the cmdlet along the pipeline:
Select-XML -Connection $conn -Table NorthwindOData -Where "Email = '[email protected]'" | Update-XML -Columns @("Email") -Values @("[email protected] 2")