Update-DynamicsCRM Cmdlet
Updates Microsoft Dynamics CRM data.
Syntax
Update-DynamicsCRM [parameters]
Remarks
The Update-DynamicsCRM cmdlet allows you to use a syntax similar to SQL UPDATE statements to update Microsoft Dynamics CRM data.
$conn = Connect-DynamicsCRM -CRMVersion "CRM2011+" -Url "http://MySite/MyOrganization" -User "MyUser" -Password "MyPassword" Update-DynamicsCRM -Connection $conn -Table "Lead" -Columns @("FirstName") -Values @("Jon Doe") -Id "1045625d-99ee-e011-a272-00155d01ad6b"The Where parameter can also be used to specify the primary key of the table:
Update-DynamicsCRM -Connection $conn -Table "Lead" -Columns @("FirstName") -Values @("Jon Doe") -Where "Id = '1045625d-99ee-e011-a272-00155d01ad6b'"The primary key can also be passed to the cmdlet along the pipeline:
Select-DynamicsCRM -Connection $conn -Table Lead -Where "FirstName = 'Bob'" | Update-DynamicsCRM -Columns @("FirstName") -Values @("Bob 2")