Cmdlets for Microsoft Dynamics CRM

Build 24.0.9060

Update-DynamicsCRM Cmdlet

Parameters   Output Objects  

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")

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