共用方式為


Import-SPBusinessDataCatalogModel

 

適用版本: SharePoint Foundation 2010, SharePoint Server 2010

上次修改主題的時間: 2015-03-09

匯入 Business Data Connectivity 模型。

Syntax

Import-SPBusinessDataCatalogModel -Identity <MetadataObject> -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-LocalizedNamesIncluded <SwitchParameter>] [-ModelsIncluded <SwitchParameter>] [-PermissionsIncluded <SwitchParameter>] [-PropertiesIncluded <SwitchParameter>] [-SettingId <String>] [-WhatIf [<SwitchParameter>]]

詳細描述

Import-SPBusinessDataCatalogModel Cmdlet 會匯入 Business Data Connectivity 模型。Business Data Connectivity 模型有兩類:Model 類型 (.bdcm) 與 Resource 類型 (.bdcr)。Model 類型包含基礎 XML 中繼資料,而且也可能包含資源屬性。Resource 類型只包含資源屬性。

Parameters

參數 必要 類型 描述

Identity

必要

Microsoft.SharePoint.BusinessData.Administration.MetadataObject

指定要匯入的 Business Data Connectivity 中繼資料儲存區中繼資料物件。

Path

必要

System.String

指定要使用的路徑與名稱。

此類型必須是下列其中一種格式的有效路徑:

- C:\folder_name\file.bdcm

- \\server_name\folder_name\file.bdcm

- …\folder_name\file.bdcm

AssignmentCollection

選用

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

為能適當處置物件而管理物件。使用 SPWebSPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。使用 SPWebSPSiteSPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。

注意

使用 Global 參數時,所有物件會包含在全域儲存區內。若未立即使用物件,或未使用 Stop-SPAssignment 命令處置物件,將會發生記憶體不足的狀況。

Confirm

選用

System.Management.Automation.SwitchParameter

執行命令之前,會先提示您進行確認。如需詳細資訊,請輸入下列命令:get-help about_commonparameters

Force

選用

System.Management.Automation.SwitchParameter

若檔案已存在,則覆寫 Business Data Connectivity 模型。

LocalizedNamesIncluded

選用

System.Management.Automation.SwitchParameter

指定匯入多語系的商務資料欄位名稱。

ModelsIncluded

選用

System.Management.Automation.SwitchParameter

指定模型包含在匯入的 Business Data Connectivity 模型檔案中。模型包含系統的基礎 XML 中繼資料。

PermissionsIncluded

選用

System.Management.Automation.SwitchParameter

指定匯入 Business Data Connectivity 模型中的權限。

PropertiesIncluded

選用

System.Management.Automation.SwitchParameter

指定匯入 Business Data Connectivity 模型的屬性。

SettingId

選用

System.String

指定要匯入的自訂環境設定模型圖塊。

此類型必須是可識別模型圖塊的有效字串,例如 ModelSlice1。

WhatIf

選用

System.Management.Automation.SwitchParameter

顯示訊息描述命令效果,而非描述命令執行的效果。如需詳細資訊,請輸入下列命令:get-help about_commonparameters

輸入類型

傳回類型

Example

------------------範例------------------

$MetadataStore = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Catalog" -ServiceConext http://contoso

Import-SPBusinessDataCatalogModel -Path "C:\folder\model.bdcm" -Identity $MetadataStore

此範例會取得 Business Data Connectivity 中繼資料儲存區,然後從指定的路徑匯入屬於 Model 類型的 Business Data Connectivity 模型,此模型的名稱是 model

See Also

Reference

Export-SPBusinessDataCatalogModel
Remove-SPBusinessDataCatalogModel