How can I export external content type as a BDCM file with powershell?
-
Tuesday, August 07, 2012 9:07 AM
I can export external content type from SharePoint Designer or Central Administration. However, I want to export ect as bdcm file with powershell in order to export ect automatically.
There is an exapmle in techNet Export-SPBusinessDataCatalogModel;
$Model = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Model" - Name "ContosoModel" -ServiceContext http://contoso Export-SPBusinessDataCatalogModel -Identity $Model -Path "C:\folder\model.bdcm"File was created with this command but the file content is not similar with SP Designer export file.
How can I do that. I am waiting your help..
Thank you.
All Replies
-
Wednesday, August 08, 2012 10:27 AMHi,Please clarify what you mean by "the file content is not similar with SP Designer export file". What is the difference?
Dmitry
Lightning
Tools Check out our SharePoint tools and web parts |
Lightning Tools Blog
- Edited by Dmitry KaloshinMicrosoft Community Contributor Wednesday, August 08, 2012 10:28 AM
-
Wednesday, August 08, 2012 2:30 PM
The difference is that bdcm file contents are not similar. SP Designer export file contains lobsystem information, finder and specific finder methods. However, when I get the bdcm file from powershell script, it contains just document header etc. I want to get bdcm file like SPDesigner exporting or Cent. Administration BCS exporting. I try to be clear, I hope so, it is not still question marks in heads?
Thanks,
-
Friday, August 10, 2012 11:13 AM
Hi,
If your BDC model was created in SPD I think you can't it export from Central Administration as you wish because it can be empty (the same result as using powershell). For example take a look at my example:
If I drill down into the model with name SharePointDesigner-Northwind-Administrator-2a90fa6d-f6f0-4f9c-96cb-17827630090d I see that this model is empty. So if I try to export this model from Central Administration it won't contain any entities.
Dmitry
Lightning
Tools Check out our SharePoint tools and web parts |
Lightning Tools Blog -
Friday, August 10, 2012 2:50 PM
Hi Dmitry,
Thank you for your answer, but I know that SPD and Central Administration are the appropriate way to export bdcm file, I have to write script to export bdcm file in .NET solution. I want to learn How can I export bdcm file with C# or powershell script.
Muhammed KACAR
-
Tuesday, August 14, 2012 10:00 AM
Hi Muhammed,
Please take a look at this article Code Snippet: Export a BDC Model From the BDC Metadata Store
Dmitry
Lightning
Tools Check out our SharePoint tools and web parts |
Lightning Tools Blog- Marked As Answer by Daniel YangMicrosoft Contingent Staff, Moderator Friday, August 17, 2012 10:51 AM

