ObtainBDCObject Model Information
Get-spbusinessdatacatalogmetadataobject-Bdcobjecttype"Model "-Name"Sumhmodel "-ServicecontextHttp: // win08r2/
:
ImportBDCModel
$ Pssnapinlogs poin = Get-pssnapin Microsoft. Sharepoint. powershell-erroraction silentlycontinue
If ($ pssnapin1_poin-EQ $ null)
{
Add-pssnapin Microsoft. Sharepoint. powershell;
}
$ BCS = Get-spbusinessdatacatalogmetadataobject-Bdcobjecttype"Catalog "-ServicecontextHttp: // win08r2/
Import-spbusinessdatacatalogmodel-Path"C: http://www.cnblogs.com/sumh/admin/file://testmodel.xml "-Identity$ BCS
DeleteBDCModel
$ Pssnapinappspoin = Get-pssnapin Microsoft. Sharepoint. powershell-ErroractionSilentlycontinue
If ($ pssnapin1_poin-EQ $ null)
{
Add-pssnapin Microsoft. Sharepoint. powershell;
}
$ BCS = Get-spbusinessdatacatalogmetadataobject-Bdcobjecttype"Model "-Name"Testmodel "-ServicecontextHttp: // win08r2/
If ($ BCS)
{
Remove-spbusinessdatacatalogmodel-Identity$ BCS
}