Copy-SPContentTypes

指定從內部部署複寫到 SharePoint Online (SPO) 環境的內容類型。

Syntax

Copy-SPContentTypes
    [-AssignmentCollection <SPAssignmentCollection>]
    [-AuthEndpoint <String>]
    -ContentTypeNames <String[]>
    -Credential <PSCredential>
    [-GraphApiEndPoint <String>]
    -LocalSiteUrl <Uri>
    -LocalTermStoreName <String>
    -RemoteSiteUrl <Uri>
    [<CommonParameters>]

Description

此 Cmdlet 用於 SharePoint Online 的混合式案例,將內容類型從內部部署伺服器陣列複製到 SharePoint Online。

範例

------------Example 1 -----------

Copy-SPContentTypes -LocalSiteUrl https://localsite/ -LocalTermStoreName "managed metadata service application proxy" -RemoteSiteUrl https://contoso.sharepoint.com/ -ContentTypeNames @("ContentTypeA", "ContentTypeB") -Credential (Get-Credential)

此範例會將本機站台 https://localsite/ 上 (其字詞庫名為 Managed Metadata Service) 名為 ContentTypeA、ContentTypeB 的指定內容類型移轉至遠端站台 https://contoso.sharepoint.com/ 的中樞網站。 如果遠端站台是中樞網站台,則移轉目標將會是本身。

參數

-AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

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

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-AuthEndpoint

指定要使用的 AuthEndpoint,而非預設的一個。

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-ContentTypeNames

指定要移轉的內容類型名稱。 可以是陣列形式。

Type:String[]
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Credential

指定目標 SharePoint Online 網站的系統管理員帳戶認證。

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-GraphApiEndPoint

指定要使用的 GraphApiEndpoint,而非預設的一個。

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-LocalSiteUrl

指定移轉來源。 可以是本機站台或本機中樞網站。

Type:Uri
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-LocalTermStoreName

指定本機站台的本機字詞庫名稱。

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-RemoteSiteUrl

指定移轉目標。 您可以輸入遠端網站 URL 或遠端中樞網站 URL,這兩者都會經過處理成為中樞網站 URL。

Type:Uri
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

輸入

System.Uri

System.String System.String[] System.Management.Automation.PSCredential Microsoft.SharePoint.PowerShell.SPAssignmentCollection

輸出

系統.物件