Cmdlets for OData

Build 20.0.7587

Invoke-OData Cmdlet

Parameters   Output Objects  

Searches and updates OData data.

Syntax

Invoke-OData [parameters]

Remarks

The Invoke-OData cmdlet allows you to use SQL statements to execute any SQL statement directly. Below is the syntax for a parameterized query:

$query = Invoke-OData -Connection $connection -Query 'SELECT * FROM Lead WHERE FirstName=@FirstName' -Params @{'@FirstName'='Bartholomew'}
This cmdlet is also useful for executing stored procedures. Use the EXEC keyword to call a stored procedure:
$query = Invoke-OData -Connection $connection -Query 'EXEC Search Url = @Url' -Params @{"http://mysite.com/MyOrgroot/XRMServices/2011/OrganizationData.svc/LeadSet"}

Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 20.0.7587