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.

2 Answers 2


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
  • 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, 2012 at 11:43
  • You are right, thank you, while executing the command I've made a copy/paste, see updated answer please! Aug 7, 2012 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, 2012 at 14:33
  • As far as I see: You can use the Export-SPBusinessDataCatalogModel cmdlet (as its name suggests) only for exporting models (it means you should use Get-SPBusinessDataCatalogMetadataObject -BdcObjectType Model, but not Catalog or LobSystem, for example), otherwise you receive an exception: "This command is only supported on Models". Forthermore, the Name parameter seems to be irrelevant when using Get-SPBusinessDataCatalogMetadataObject -BdcObjectType Catalog.
    – pholpar
    May 7, 2018 at 14:54

Try change -BdcObjectType Model to LobSystem

  • 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, 2012 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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