ASP.net;sharepoint
c# moss 程序人生
 

获取bdc对象模型信息

Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Model" -Name "sumhModel" -ServiceContext http://win08r2/

 

效果图:

 

导入BDC模型

$PSSnapinSharePoin = Get-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction silentlycontinue

if( $PSSnapinSharePoin -eq $Null)

{

Add-PSSnapin Microsoft.SharePoint.PowerShell;

}        

$bcs=Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Catalog" -ServiceContext http://win08r2/

Import-SPBusinessDataCatalogModel -Path "c:http://www.cnblogs.com/sumh/admin/file://testmodel.xml/" -Identity $bcs

 

删除BDC模型

$PSSnapinSharePoin = Get-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction silentlycontinue

if( $PSSnapinSharePoin -eq $Null)

{

Add-PSSnapin Microsoft.SharePoint.PowerShell;

}        

$bcs=Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Model" -Name "testModel" -ServiceContext http://win08r2/

if($bcs)

{

Remove-SPBusinessDataCatalogModel -Identity $bcs

}

 

posted on 2011-05-06 11:05  sumh  阅读(204)  评论(0编辑  收藏  举报