Copy-SPContentTypes

指定适用于从本地复制到 SharePoint Online (SPO) 环境的内容类型。

语法

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

说明

此 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)

本示例将命名为:ContentTypeA、ContentTypeB(其术语存储名为“托管元数据服务应用程序代理”)的本地站点上 https://localsite/ 的指定内容类型迁移到远程站点的中心站点 https://contoso.sharepoint.com/。 如果远程站点是中心站点,则迁移目标将是自身。

参数

-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

-工作分配

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.

注意:使用全局参数时,所有对象都包含在全局存储中。 If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
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

输出

System.Object