Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Create Tables and Columns using PowerShell

Is it possible to created CDS tables and columns using PowerShell?

The import wizard/data flow was unable to correctly import a large SharePoint list.

Community Support
Community Support

Hello @ques0buffet ,


did you try to set the Power query in a Batch to accommodate that many records? If not, can you try that method and see if that works.



  We can do it, however there is no public facing document to provide the steps. If the above method doesn't help, then I believe you might need to use the XRM tooling cmdlets for this. However, I would suggest to first try it on a test environment before running on production as this is not shared by Microsoft- 

MS article to connect to CDS using Powershell-XRM tooling: 


Let me know if that answers your query.

Community Support
Community Support

I was not able to create a new table using Power Query due to the column types coming from SharePoint.
Thank you for the API documentation.

Super User
Super User

Hi @ques0buffet,

You can also use Dataflows with SharePoint as the data source to create your entity, map and import the records into CDS.

Furthermore, you can create your tables and columns with PowerShell with the CreateEntityRequest and CreateAttrributeRequest messages. Here's an example:

$entity = new-object Microsoft.Xrm.Sdk.Messages.EntityMetadata
$entity.SchemaName = "schemaname"
$entity.DisplayName = "name"
//add other entity properties

$request = new-object Microsoft.Xrm.Sdk.Messages.CreateEntityRequest
$request.Entity = $entity
//add other CreateEntityRequest properties

$response = $Connection.ExecuteCrmOrganizationRequest($request)

Hope this helps!

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.


Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,403)