SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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'm trying to create list from External content types with powershell. I'm trying to get the model, through this line : $Model = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType Model -Name $ModelName -ServiceContext $ServiceContext

But $Model is null. I'm not sure about what to put in ServiceContext is it the Url of my central administration ? Or of my site ? And also for the noun of my Model, I went in the central administration, in the BDC and used the entire name which is : PPMO.Model.Portefeuille_SAP.

Do i have to use this one ?

Any advice would help, Thanks by advance :).

Thoma

share|improve this question
up vote 0 down vote accepted

This contains an excellent example of what to do, enjoy!

http://blog.netnerds.net/2011/09/sharepoint-powershell-batch-import-models-create-ects-set-permissions/

(this should set the model name for you, I believe the ServiceContext should refer to your CA e.g. your localhost, as this is where the BDCM will be imported)

share|improve this answer

Your Answer

 
discard

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.