Importing bDCM file to BDC

Althought BDCM files can be copied to BDC store using UI or solution packages but you can also use PowerShell.

$filename = “e:\BDC.BDCM”

$metadataStore = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Catalog" -ServiceContext "" Import-SPBusinessDataCatalogModel -Path $filename -Identity $metadataStore -Force Remove-Item $filename $entity = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Entity" -ServiceContext "" -Name "Entity1" -Namespace "Namespace.Domain" $claimAdmin = New-SPClaimsPrincipal -Identity "contoso\spadmin" -IdentityType WindowsSamAccountName Grant-SPBusinessDataCatalogMetadataObject -Identity $entity -Principal $claimAdmin -Right "Execute,SetPermissions,Edit,SelectableInClients" $claimUsers = New-SPClaimsPrincipal -Identity "Domain Users" -IdentityType WindowsSamAccountName Grant-SPBusinessDataCatalogMetadataObject -Identity $entity -Principal $claimUsers -Right "Execute,Edit,SelectableInClients"

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s