web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Query Tables Attributes Metadata via PowerShell

(0) ShareShare
ReportReport
Posted on by 47

This refers to Powershell query to Dynamics 365(Dataverse). I need to export metadata for 40 Dynamics 365/Dataverse tables(entities). For each table I have the list of columns to get metadata for : eg: account (account_col1, account_col2,..., account_col270). Each of the 40 tables can contain large number of columns/attributes, but I have the column list for each entity (not all columns of these entities are required). The metadata export should contain following columns :
tableName,
columnName(attribute)
DataType,
Max_Length,
Precision,
Scale,
is_nullable.

Datatype example can be INT, decimal, etc (for which precision and scale apply), or varchar, uniqueidentifier for which precision and scale are 0 but is captured Max_Length. This metadata export will help pre-create tables on the destination relational database where the actual data will be imported (data has been export separate). I can see this metadata columns in SSMS by join from sys.columns, sys.objects, but cannot do this dynamically.
to create this metadata export I plan on using PowerShell. Looking for a similar PS script where can input tablename and columnName and get the 7 metadata info that I listed above for each of the table columns pairs. I found https://www.powershellgallery.com/packages/Microsoft.Xrm.Data.Powershell/2.1/Content/Microsoft.Xrm.D... but was not able to find all export columns that I need (eg: userdatatype, precision, scale, is_nullable).

Can you help how I can get the 7 metadata columns as above for the Dataverse tables attributes? I would prefer in PowerShell.

Thank you !

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 46 Most Valuable Professional

#2
Pallavi Phade Profile Picture

Pallavi Phade 33

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 28 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans