1. 获取BCS服务应用程序的标识
Get-SPServiceApplication
2. 获取指定的BCS服务应用程序实例
$bcs = Get-SPServiceApplication
-Identity b7b3652e-6f51-4161-935a-0631a1100ecf
3. 配置BCS数据库
$bcs = Get-SPServiceApplication
-Identity b7b3652e-6f51-4161-935a-0631a1100ecf
Set-SPBusinessDataCatalogServiceApplication –Identity $bcs
–DatabaseName BCS_DB
4. 获取BCS元数据对象
$bcsMeta = Get-SPBusinessDataCatalogMetadataObject –ServiceContext
http://sp2010 –BDCObjectType Catalog –Name ApplicationRegistry
5. 导入BCS模型
Import-SPBusinessDataCatalogModel –Identity $bcsMeta
–Path E:\BCS_Model.bdcm
Force:如果模型存在强制覆盖
ModelsIncluded:模型包含于导入的XML文件
PermissionsIncluded:包含模型的权限
PropertiesIncluded:包含BCS的属性
6. 导出BCS模型
$bcsMeta = Get-SPBusinessDataCatalogMetadataObject –ServiceContext
http://sp2010 –BDCObjectType Catalog –Name ApplicationRegistry
Export-SPBusinessDataCatalogModel –Identity $bcsMeta
–Path E:\BCS_Model.bdcm
Force:强制覆盖一个已经存在的导出文件
ModelsIncluded:模型包含于导出的XML文件
PermissionsIncluded:包含模型的权限
PropertiesIncluded:包含BCS的属性
ProxiesIncluded:包含BCS服务应用程序的代理信息