Cmdlets for Microsoft Dynamics CRM

Build 24.0.9060

Remove-DynamicsCRM Cmdlet

Parameters   Output Objects  

Deletes Microsoft Dynamics CRM data.

Syntax

Remove-DynamicsCRM [parameters]

Remarks

The Remove-DynamicsCRM cmdlet allows you to use a syntax similar to SQL DELETE statements to delete Microsoft Dynamics CRM data.

$conn = Connect-DynamicsCRM -CRMVersion "CRM2011+" -Url "http://MySite/MyOrganization" -User "MyUser" -Password "MyPassword"
Remove-DynamicsCRM -Connection $conn -Table "Lead" -Id "1045625d-99ee-e011-a272-00155d01ad6b"
The Where parameter can also be used to specify the primary key:
Remove-DynamicsCRM -Connection $conn -Table "exTablePowershell;" -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'" | Remove-DynamicsCRM

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