SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

I've used this in the past with success for a full catalog

$mybcsMeta = Get-SPBusinessDataCatalogMetadataObject –ServiceContext http://sp.local –BDCObjectType Catalog –Name MyModel
Export-SPBusinessDataCatalogModel –Identity $mybcsMeta –Path C:\BCS_Model.bdcm

The differences could come from the use of the parameters which have different defaults via UI(SPD or SPCA vs Powershell).

  • ModelsIncluded —Models are included in the exported XML file
  • PermissionsIncluded —The permissions to the model are included in
    the export
  • PropertiesIncluded —Specifies that BCS properties are included in the export
share|improve this answer
If I am wrong, please correct me! Your suggestion is not a different solution from my script. I don't understand that why we set the parameters instead of using values directly. I think no difference!! – mkacar Aug 7 '12 at 11:43
You are right, thank you, while executing the command I've made a copy/paste, see updated answer please! – Marius Constantinescu - MVP Aug 7 '12 at 14:12
I am looking on exporting bdcm file with powershell or c#, I couldn't find specific example or information about that. How can I use ModelsIncluded or PropertiesIncluded? Thanks.. – mkacar Aug 8 '12 at 14:33

Try change -BdcObjectType Model to LobSystem

share|improve this answer
While this post may answer the question, we prefer more details such as "why". Please edit your post with additional details. See answer for general guidelines. – SPDoctor Aug 7 '12 at 12:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.