PnP PowerShell 概述

SharePoint 模式和做法 (PnP) 包含一个 PowerShell 命令库, (PnP PowerShell) ,您可以对 SharePoint 执行复杂的预配和项目管理操作。 这些命令使用 CSOM,并且可在本地 SharePoint Online 中适用。

SharePoint 模式和做法

适用于: SharePoint Online、SharePoint 2019、SharePoint 2016、SharePoint 2013

安装

有三种方法可以安装 cmdlet。 建议在可能的情况下,从 PowerShell 库安装它们。 此外,您还可以下载安装文件或运行 PowerShell 脚本,以下载 PowerShellGet 模块并随后安装 cmdlet。

如果主操作系统是 Windows 10,或者安装了 PowerShellGet ,则可以运行以下命令来安装 PowerShell cmdlet:

SharePoint 版本 要安装的命令
SharePoint Online Install-Module SharePointPnPPowerShellOnline
SharePoint 2019 Install-Module SharePointPnPPowerShell2019
SharePoint 2016 Install-Module SharePointPnPPowerShell2016
SharePoint 2013 Install-Module SharePointPnPPowerShell2013

Note

如果从 Github 安装最新的 PowerShellGet,则可能会收到一条错误消息,说明 PackageManagement\Install-Package:正在安装的模块 "SharePointPnPPowerShellOnline" 的版本 "x.x" 不是目录签名的。

若要在收到此错误时安装 cmdlet,请使用 Install-Module cmdlet 指定-SkipPublisherCheck 开关,例如 Install-Module SharePointPnPPowerShellOnline -SkipPublisherCheck -AllowClobber

安装程序文件

您可以从 PnP PowerShell 存储库的 " 版本 " 部分下载安装程序文件。 这些文件将在每月的基础上进行更新。 运行安装并重新启动 PowerShell 的所有打开实例以使用 cmdlet。

安装脚本

这是安装在至少安装了 PowerShell v3 的计算机上的一种替代方法。 您可以通过打开 PowerShell 并运行来查找 PowerShell 的版本 $PSVersionTable.PSVersion 。 的值 Major 应大于3。

若要安装 cmdlet,您可以运行以下命令来安装 PowerShell 程序包管理,然后从 PowerShell 库安装 PowerShell 模块。

Invoke-Expression (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/pnp/PnP-PowerShell/master/Samples/Modules.Install/Install-SharePointPnPPowerShell.ps1')

端更新

每个月都将提供 PnP PowerShell Cmdlet 的新版本。 如果您以前使用安装程序文件安装了 cmdlet,只需下载 最新版本 并运行安装程序即可。 这将更新现有安装。

如果已使用 PowerShellGet 通过 PowerShell 库安装了 cmdlet,则可以 Install-Module 使用以下命令来安装最新的更新版本:

Update-Module SharePointPnPPowerShell*

这将在启动 PowerShell 3.0 后自动加载模块。

您可以使用以下命令检查已安装的 PnP-PowerShell 版本:

Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending

入门

若要使用库,首先需要连接到租户:

Connect-PnPOnline –Url https://yoursite.sharepoint.com –Credentials (Get-Credential)

注意:如果您在租户上使用多重身份验证,请使用

Connect-PnPOnline -Url https://yoursite.sharepoint.com -UseWebLogin

若要查看所有 cmdlet,请输入

Get-Command -Module *PnP*

在以下链接中,你将了解有关如何开始使用 cmdlet 的几个视频:

设置凭据

有关如何使用 Windows 凭据管理器设置可在无人参与脚本中使用的凭据的详细信息,请参阅此wiki 页面

Cmdlet 概述

应用

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPApp 将可用应用程序添加到应用程序目录并将其上载到应用程序目录 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPApp 返回应用程序目录中的可用应用程序 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPApp 从应用程序目录安装可用应用程序 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell 发布 PnPApp 发布/部署/信任应用程序目录中的可用应用程序 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPApp 从应用程序目录中删除应用程序 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPApp 从网站卸载可用外接程序 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPApp 取消发布/撤消应用程序目录中的可用加载项 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPApp 更新应用程序目录中的可用应用程序 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPAppInstance 返回 SharePoint AddIn 实例 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPAppInstance 从网站中删除应用程序 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPApplicationCustomizer 添加 SharePoint 框架客户端扩展应用程序定制器 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPApplicationCustomizer 返回所有 SharePoint 框架客户端扩展应用程序定制器 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPApplicationCustomizer 删除 SharePoint 框架客户端扩展应用程序定制器 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPApplicationCustomizer 更新 SharePoint 框架客户端扩展应用程序定制器 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell。 PnPAppPackage 向网站添加 SharePoint 外接程序 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPAppToTeams 将应用程序从租户应用程序目录同步到 Microsoft 团队应用程序目录 SharePoint Online
@SharePointPnPPowerShell PnPTenantServicePrincipalPermission 将指定的权限显式授予 "SharePoint Online 客户端" 服务主体 SharePoint Online

基本 Cmdlet

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPAccessToken 请求 OAuth 访问令牌 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPAppAuthAccessToken 返回访问令牌 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPAuthenticationRealm 返回身份验证领域 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPAzureCertificate 获取现有证书 ( 的 PEM 值和清单设置,以便在使用 CSOM 通过仅限应用的 ADAL 应用程序使用时) 。 请参阅获取 https://github.com/SharePoint/PnP-PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions 如何入门的示例。 KeyCredentials 包含 ADAL 应用程序清单部分。 证书包含 PEM 编码的证书。 PrivateKey 包含证书的 PEM 编码的私钥。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPAzureCertificate 生成新的2048bit 自签名证书和清单设置,以便在使用 CSOM 通过仅限应用的 ADAL 应用程序时使用。 请参阅获取 https://github.com/SharePoint/PnP-PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions 如何入门的示例。 KeyCredentials 包含 ADAL 应用程序清单部分。 证书包含 PEM 编码的证书。 PrivateKey 包含证书的 PEM 编码的私钥。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPConnection 返回当前上下文 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPContext 返回当前上下文 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPContext 设置 ClientContext SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPException 返回最后一次发生的异常 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPHealthScore 检索在他的 Url 参数中给出的站点的 healthscore,如果未提供 Url 参数,则检索当前连接中的。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019
@SharePointPnPPowerShell Admin.sharepoint.com 连接到 SharePoint 网站 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell 断开连接-Admin.sharepoint.com 断开上下文的连接 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPProperty 返回之前未加载的 ClientObject 属性。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPQuery 执行当前排队的操作 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSPRestMethod 调用面向 SharePoint 网站的 REST 请求 SharePoint Online
@SharePointPnPPowerShell PnPStoredCredential 将凭据添加到 Windows 凭据管理器 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPStoredCredential 获取凭据 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPStoredCredential 删除凭据 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTraceLog 打开或关闭日志跟踪 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

品牌打造

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPCustomAction 添加自定义操作 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPCustomAction 返回用户自定义操作 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPCustomAction 删除自定义操作 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFooter 获取有关当前网站的页脚的配置 SharePoint Online
@SharePointPnPPowerShell PnPFooter 配置当前网站的页脚 SharePoint Online
@SharePointPnPPowerShell PnPHomePage 返回主页 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPHomePage 设置当前网站的主页。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPJavaScriptBlock 将 JavaScript 代码片段/块的链接添加到网站或网站集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPJavaScriptLink 将指向 JavaScript 文件的链接添加到 web 或 sitecollection,仅对 SharePoint 经典网站体验有效。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPJavaScriptLink 返回位置类型为 ScriptLink 的所有或某个特定的自定义操作 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPJavaScriptLink 从网站或网站集中删除 JavaScript 链接或块 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPMasterPage 返回默认和自定义母版页的 URL。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPMasterPage 设置 masterpage SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPMinimalDownloadStrategy 激活或停用最少下载策略。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPNavigationNode 将项添加到导航元素 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPNavigationNode 返回所有或特定导航节点 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPNavigationNode 从快速启动或顶部导航中删除菜单项 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。 PnPResponsiveUI 停用 PnP 响应 UI 加载项 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPResponsiveUI 激活 PnP 响应 UI 加载项 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTheme 返回当前网站的当前主题/组合外观。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTheme 设置当前网站的主题。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWebTheme 设置当前网站的主题。 SharePoint Online

Client-Side 页面

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPAvailableClientSideComponents 获取特定页面上的可用客户端组件 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPClientSideComponent 将 Client-Side 组件移到不同的节/列 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell Convertto-pnpclientsidepage 添加 Client-Side 页面 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell ConvertTo-Convertto-pnpclientsidepage 将经典页面 (wiki 或 web 部件页) 转换为 Client-Side 页 SharePoint Online
@SharePointPnPPowerShell Convertto-pnpclientsidepage 获取新式网站页面 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell Convertto-pnpclientsidepage 删除 Client-Side 页面 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell Convertto-pnpclientsidepage 设置 Client-Side 页面的参数 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPClientSidePageConversionLog 将当前客户端页面转换日志数据保留到链接到上次使用的页面转换的记录器。 需要与 ConvertTo-PnPClientSidePage cmdlet 中的-LogSkipFlush 标志联合使用 SharePoint Online
@SharePointPnPPowerShell PnPClientSidePageMapping 获取用于发布门户页面布局的内置 maping 文件或自定义映射文件。 这些映射文件用于定制页面转换体验。 SharePoint Online
@SharePointPnPPowerShell PnPClientSidePageSection 向 Client-Side 页添加新节 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPClientSideText 将文本元素添加到客户端页面。 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPClientSideWebPart 将 Client-Side Web 部件添加到客户端页面 SharePoint Online,SharePoint 2019

内容类型

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPContentType 添加新的内容类型 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPContentType 检索内容类型 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPContentType 从网站中删除内容类型 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPContentTypeFromList 从列表中删除内容类型 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPContentTypePublishingHubUrl 返回内容类型发布中心 URL SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPContentTypeToList 将新的内容类型添加到列表 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPDefaultContentTypeToList 设置列表的默认内容类型 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFieldFromContentType 从内容类型中删除网站栏 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFieldToContentType 将现有网站栏添加到内容类型 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

诊断实用程序

Cmdlet 说明 平台
@SharePointPnPPowerShell 量 PnPList 返回列表对象上的统计信息。 这可能会在大于列表视图阈值的列表上失败 SharePoint Online、SharePoint 2016、SharePoint 2019
@SharePointPnPPowerShell 量 PnPResponseTime 通过发送探测请求获取有关指定终结点的响应时间的统计信息 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell 量 PnPWeb 返回 web 对象的统计信息 SharePoint Online、SharePoint 2016、SharePoint 2019

Document Sets

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPContentTypeFromDocumentSet 从文档集中删除内容类型 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPContentTypeToDocumentSet 将内容类型添加到文档集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPDocumentSet 在库中创建新的文档集。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPDocumentSetField 将网站栏从可用的内容类型设置为文档集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPDocumentSetTemplate 检索文档集模板 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

事件接收器

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPEventReceiver 添加新的远程事件接收器 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPEventReceiver 返回注册的 core.eventreceivers SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPEventReceiver 删除 eventreceiver SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

功能

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPExtensibilityHandlerObject 创建一个 ExtensibilityHandler 对象,该对象将由 Get-PnPProvisioningTemplate cmdlet 使用 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。 PnPFeature 禁用功能 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFeature 启用功能 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFeature 返回已激活的所有或某个特定功能 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

字段

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPField 添加字段 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPField 从列表或网站中返回一个字段 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPField 从列表或网站中删除字段 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPField 更改特定列表或整个 web 中的字段的一个或多个属性 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFieldFromXml 根据 CAML/XML 字段定义将字段添加到列表或添加为网站栏 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTaxonomyField 添加分类字段 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPView 更改视图属性 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

文件和文件夹

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPFile 将文件上传到 Web SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFile 将文件或文件夹复制到其他位置。 此位置可以在相同的文档库、相同网站、同一网站集内,甚至可以位于同一个租户上的另一个网站集内。 目前,要复制的文件或文件夹的文件大小限制为200MB。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFile 在网站的虚拟文件系统中查找文件。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFile 下载文件。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFile 将文件或文件夹移到其他位置 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFile 删除文件。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。重命名 PnPFile 在其当前位置重命名文件 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFileCheckedIn 签入文件 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFileCheckedOut 签出文件 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFileVersion 检索文件的所有版本。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFileVersion 删除所有或特定的文件版本。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell 重置 PnPFileVersion 将文件重置为其以前的版本 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell 还原 PnPFileVersion 还原特定的文件版本。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFolder 在父文件夹内创建文件夹 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFolder 返回文件夹对象 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFolder 将文件夹移动到当前网站中的其他位置。 如果要将文件夹移动到不同的网站集,请改用 Move-PnPFile cmdlet,该 cmdlet 还支持移动文件夹,也支持跨网站集。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFolder 删除父文件夹中的文件夹 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。重命名 PnPFolder 重命名文件夹 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。解决 PnPFolder 从给定的网站相对路径返回文件夹,并进行创建(如果不存在的话)。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFolderItem 列出文件夹中的内容 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPItemProxy 使用 SharePoint 提供程序和文件系统提供程序之间的 Copy-Item 的代理 cmdlet SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPItemProxy 使用 SharePoint 提供程序和文件系统提供程序之间的 Move-Item 的代理 cmdlet SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

信息管理

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPLabel 如果适用,则获取指定列表或库的 Office 365 保留标签/标记 ((如果适用)) SharePoint Online
@SharePointPnPPowerShell 重置 PnPLabel 将指定列表或库中的保留标签重置为 "无" SharePoint Online
@SharePointPnPPowerShell PnPLabel 设置指定列表或库中的保留标签。 使用 Reset-PnPLabel 再次删除该标签。 SharePoint Online
@SharePointPnPPowerShell PnPListInformationRightsManagement 获取应用了网站策略的网站的关闭状态 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListInformationRightsManagement 获取应用了网站策略的网站的关闭状态 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSiteClosure 获取应用了网站策略的网站的关闭状态 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSiteClosure 打开或关闭应用了网站策略的网站 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSitePolicy 设置网站策略 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSitePolicy 检索所有或某个特定的网站策略 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

列表

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPDefaultColumnValues 清除文档库的默认列值 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPDefaultColumnValues 获取文档库中所有文件夹的默认列值 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPDefaultColumnValues 设置文档库的默认列值 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFolderPermission 设置文件夹权限。 使用 Get-PnPRoleDefinition 检索您可以使用此 cmdlet 添加或删除的所有可用角色。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPList 从 SharePoint 中返回列表 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPList 新建列表 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPList 删除列表 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPList 更新列表设置 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListItem 将项添加到列表中,并将创建时间设置为当前日期和时间。 将作者设置为执行 cmdlet 的当前已通过身份验证的用户。 为了将作者设置为其他用户,请参阅 PnPListItem。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListItem 检索列表项 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListItem 从列表中删除项 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListItem 更新列表项 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListItemPermission 设置列表项权限。 使用 Get-PnPRoleDefinition 检索您可以使用此 cmdlet 添加或删除的所有可用角色。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListItemToRecycleBin 将项目从列表移动到回收站 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListPermission 设置列表权限 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPReIndexList 将列表标记为在下次增量爬网过程中进行完整索引 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPView 向列表添加视图 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPView 返回列表中的一个或所有视图 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPView 从列表中删除视图 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

管理 API

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPManagementApiAccessToken 获取 Office 365 管理 API 的访问令牌 SharePoint Online
@SharePointPnPPowerShell PnPOffice365CurrentServiceStatus 从 Office 365 管理 API 获取 Office 365 服务的当前服务状态 SharePoint Online
@SharePointPnPPowerShell PnPOffice365HistoricalServiceStatus 从 Office 365 管理 API 中获取最近7天的 Office 365 服务的历史服务状态 SharePoint Online
@SharePointPnPPowerShell PnPOffice365ServiceMessage 从 Office 365 管理 API 中获取有关 Office 365 中服务的服务消息 SharePoint Online
@SharePointPnPPowerShell PnPOffice365Services 从 Office 365 管理 API 中获取 Office 365 中提供的服务 SharePoint Online
@SharePointPnPPowerShell PnPOfficeManagementApiAccessToken 从当前连接中获取 Microsoft Office 365 管理 API 的访问令牌 SharePoint Online
@SharePointPnPPowerShell PnPUnifiedAuditLog 从 Office 365 管理 API 中获取统一的审核日志。 需要 Azure Active Directory 应用程序权限 "Microsoft.office.server.activityfeed"。 SharePoint Online

Microsoft Graph

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPAADUser 从 Azure Active Directory 中检索用户 SharePoint Online
@SharePointPnPPowerShell PnPAccessToken 返回当前的 OAuth 访问令牌 SharePoint Online
@SharePointPnPPowerShell PnPDeletedMicrosoft365Group 获取一个已删除的 Microsoft 365 组或已删除的 Microsoft 365 组的列表 SharePoint Online
@SharePointPnPPowerShell PnPDeletedMicrosoft365Group 永久删除一个已删除的 Microsoft 365 组 SharePoint Online
@SharePointPnPPowerShell 还原 PnPDeletedMicrosoft365Group 还原一个已删除的 Microsoft 365 组 SharePoint Online
@SharePointPnPPowerShell PnPGraphSubscription 从 Microsoft Graph 中获取订阅。 需要 Azure Active Directory 应用程序权限 "订阅。请参阅 All"。 SharePoint Online
@SharePointPnPPowerShell PnPGraphSubscription 创建一个新的 Microsoft Graph 订阅,该订阅允许在 Microsoft Graph 中发生更改时调用 webhook API SharePoint Online
@SharePointPnPPowerShell PnPGraphSubscription 删除现有的 Microsoft Graph 订阅。 所需的 Azure Active Directory 应用程序权限取决于订阅所在的资源,请参阅 /graph/api/subscription-delete#permissions SharePoint Online
@SharePointPnPPowerShell PnPGraphSubscription 更新现有的 Microsoft Graph 订阅。 所需的 Azure Active Directory 应用程序权限取决于订阅所在的资源,请参阅 /graph/api/subscription-delete#permissions SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365Group 获取一个 Microsoft 365 组或 Microsoft 365 组列表 SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365Group 创建新的 Microsoft 365 组 SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365Group 删除一个 Microsoft 365 组 SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365Group 设置 Microsoft 365 组属性 SharePoint Online
@SharePointPnPPowerShell 重置 PnPMicrosoft365GroupExpiration 通过在 Azure Active Directory 上设置的组过期策略中定义的天数扩展其过期时间来续订 Microsoft 365 组 SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365GroupMember 将成员添加到特定的 Microsoft 365 组 SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365GroupMember 删除特定 Microsoft 365 组中的所有当前成员 SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365GroupMember 删除特定 Microsoft 365 组中的成员 SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365GroupMembers 获取特定 Microsoft 365 组的成员 (也称为 "统一组) "。 需要 Azure Active Directory 应用程序权限 "Group. All" 和 "User. All"。 SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365GroupOwner 删除特定 Microsoft 365 组中的所有当前所有者 (称为 "统一组") SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365GroupOwner 从特定 Microsoft 365 组中删除所有者 SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365GroupOwners 获取特定 Microsoft 365 组的所有者 SharePoint Online
@SharePointPnPPowerShell PnPSiteClassification 将一个或多个网站分类值添加到可能的值列表中 SharePoint Online
@SharePointPnPPowerShell。 PnPSiteClassification 禁用租户的网站分类 SharePoint Online
@SharePointPnPPowerShell PnPSiteClassification 为租户启用网站分类 SharePoint Online
@SharePointPnPPowerShell PnPSiteClassification 返回租户的已定义网站分类 SharePoint Online
@SharePointPnPPowerShell PnPSiteClassification 从可用值列表中删除一个或多个现有的网站分类值 SharePoint Online
@SharePointPnPPowerShell PnPSiteClassification 为租户更新网站分类 SharePoint Online

Microsoft Teams

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPTeamsApp 获取一个 Microsoft 团队应用程序或所有应用程序的列表。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsApp 将应用程序添加到团队应用程序目录。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsApp 从团队 AppCatalog 中删除应用程序。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsApp 更新 "团队" 应用程序目录中的现有应用程序。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsChannel 向现有 Microsoft 团队实例添加通道。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsChannel 获取指定团队的通道。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsChannel 从 Microsoft 团队实例中删除通道。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsChannel 更新现有团队频道 SharePoint Online
@SharePointPnPPowerShell PnPTeamsChannelMessage 将邮件发送到 Microsoft 团队频道。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsChannelMessage 将邮件发送到 Microsoft 团队频道。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsTab 将选项卡添加到现有频道 SharePoint Online
@SharePointPnPPowerShell PnPTeamsTab 获取通道中的一个或所有选项卡。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsTab 删除频道中的 "Microsoft 团队" 选项卡。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsTab 更新团队选项卡设置 SharePoint Online
@SharePointPnPPowerShell PnPTeamsTeam 获取一个 Microsoft 团队团队或一个团队列表。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsTeam 在 Microsoft 团队中创建一个新团队。 Cmdlet 将创建一个 Microsoft 365 组,然后向该组添加一个团队。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsTeam 删除 Microsoft 团队团队实例 SharePoint Online
@SharePointPnPPowerShell PnPTeamsTeam 更新现有团队。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsTeamArchivedState 设置团队的存档状态。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsTeamPicture 设置现有团队的图片。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsUser 向现有 Microsoft 团队实例添加通道。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsUser 返回团队中的所有者、成员或来宾。 SharePoint Online
@SharePointPnPPowerShell PnPTeamsUser 从团队中删除用户。 SharePoint Online

预配

Cmdlet 说明 平台
@SharePointPnPPowerShell Convertto-pnpclientsidepage 将客户端页面导出到 PnP 预配模板 SharePoint Online
@SharePointPnPPowerShell PnPDataRowsToProvisioningTemplate 将数据行添加到 PnP 预配模板内的列表 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFileFromProvisioningTemplate 从 PnP 预配模板中删除文件 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPFileToProvisioningTemplate 将文件添加到 PnP 预配模板 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell 转换 PnPFolderToProvisioningTemplate 创建现有模板 xml 的 pnp 包文件,并添加当前文件夹中的所有文件 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListFoldersToProvisioningTemplate 将文件夹添加到 PnP 预配模板内的列表 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListToProvisioningTemplate 将一个或多个列表导出到预配模板 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPProvisioningTemplate 将 PnP 预配模板对象添加到租户模板 SharePoint Online
@SharePointPnPPowerShell PnPProvisioningTemplate 将网站模板应用于网站 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell 转换 PnPProvisioningTemplate 将预配模板转换成其他架构版本 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPProvisioningTemplate 从 web 生成设置网站模板 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPProvisioningTemplate 新建预配模板对象 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPProvisioningTemplate 从文件系统或字符串中加载/读取 PnP 文件 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPProvisioningTemplate 将 PnP 网站模板保存到文件系统 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPProvisioningTemplateFromFolder 根据给定的文件夹生成预配模板,其中仅包含此文件夹中的文件 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPProvisioningTemplateMetadata 设置预配模板的元数据 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTenantSequence 将租户序列对象添加到租户模板 SharePoint Online
@SharePointPnPPowerShell PnPTenantSequence 从租户模板中) 返回一个或多个预配 sequence 对象 (s SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTenantSequence 创建新的租户序列对象 SharePoint Online
@SharePointPnPPowerShell PnPTenantSequenceCommunicationSite 创建通信网站对象 SharePoint Online
@SharePointPnPPowerShell PnPTenantSequenceSite 将现有租户序列网站对象添加到租户模板 SharePoint Online
@SharePointPnPPowerShell PnPTenantSequenceSite 返回一个或多个来自租户模板的网站 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTenantSequenceSubSite 将租户序列子网站对象添加到租户序列网站对象 SharePoint Online
@SharePointPnPPowerShell PnPTenantSequenceTeamNoGroupSite 在不使用 Microsoft 365 组内存中的对象的情况下创建新的团队网站 SharePoint Online
@SharePointPnPPowerShell PnPTenantSequenceTeamNoGroupSubSite 创建不带 Microsoft 365 组对象的团队网站子网站 SharePoint Online
@SharePointPnPPowerShell PnPTenantSequenceTeamSite 创建团队网站对象 SharePoint Online
@SharePointPnPPowerShell PnPTenantTemplate 将租户模板应用于当前租户。 若要成功运行此 cmdlet,您必须具有 Office 365 全局管理员角色。 SharePoint Online
@SharePointPnPPowerShell PnPTenantTemplate 从网站生成预配租户模板。 如果网站是 hubsite,则将包含任何已连接的网站。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTenantTemplate 创建新的租户模板对象 SharePoint Online
@SharePointPnPPowerShell PnPTenantTemplate 从文件系统中加载/读取 PnP 租户模板,并返回此模板的内存中实例。 SharePoint Online
@SharePointPnPPowerShell PnPTenantTemplate 将 PnP 预配层次结构保存到文件系统 SharePoint Online
@SharePointPnPPowerShell PnPTenantTemplate 测试无效引用的租户模板 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

Publishing

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPAvailablePageLayouts 设置当前网站的可用页面布局 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPDefaultPageLayout 将特定页面布局设置为发布网站的默认页面布局 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPHtmlPublishingPageLayout 添加基于 HTML 的发布页面布局 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPMasterPage 添加母版页 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPPublishingImageRendition 添加图像呈现形式(如果图像呈现形式的名称尚不存在的话)。这样可以防止创建两个同名的图像呈现形式。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPPublishingImageRendition 返回所有图像呈现形式,或返回某个特定的图像呈现形式(如果指定标识的话) SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPPublishingImageRendition 删除现有的图像呈现形式 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPPublishingPage 添加发布页面 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPPublishingPageLayout 添加发布页面布局 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWikiPage 添加 Wiki 网页 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWikiPage 删除 Wiki 网页 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWikiPageContent 获取 Wiki 网页的内容/源 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWikiPageContent 设置 Wiki 网页的内容 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

记录管理

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPInPlaceRecordsManagement 如果 "设置记录" 管理功能处于启用状态,则返回。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPInPlaceRecordsManagement 在 "就地记录管理" 功能中激活或停用。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。 PnPInPlaceRecordsManagementForSite 对网站就地记录管理禁用。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPInPlaceRecordsManagementForSite 启用对网站的就地记录管理。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPListItemAsRecord 将列表项 Undeclares 为记录 SharePoint Online
@SharePointPnPPowerShell PnPListItemAsRecord 将列表项声明为记录,有关详细信息,请参阅 /sharepoint/governance/records-management-in-sharepoint-server SharePoint Online
@SharePointPnPPowerShell PnPListItemIsRecord 检查列表项是否为记录 SharePoint Online
@SharePointPnPPowerShell PnPListRecordDeclaration 返回列表的手动记录声明设置 SharePoint Online
@SharePointPnPPowerShell PnPListRecordDeclaration RecordDeclaration 参数支持4个值: AlwaysAllowManualDeclaration NeverAllowManualDeclaration UseSiteCollectionDefaults SharePoint Online
Cmdlet 说明 平台
@SharePointPnPPowerShell PnPSearchConfiguration 返回搜索配置 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSearchConfiguration 删除搜索配置 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSearchConfiguration 设置搜索配置 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSearchCrawlLog 返回 SharePoint 搜索爬网日志中的条目。 请确保已通过 SharePoint 搜索管理中心授予对爬网日志的访问权限,以便 https://<tenant>-admin.sharepoint.com/_layouts/15/searchadmin/crawllogreadpermission.aspx 运行此 cmdlet。 SharePoint Online
@SharePointPnPPowerShell PnPSearchQuery 对 SharePoint 搜索索引执行任意搜索查询 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSearchSettings 检索网站的搜索设置 SharePoint Online
@SharePointPnPPowerShell PnPSearchSettings 设置网站的搜索设置 SharePoint Online
@SharePointPnPPowerShell PnPSiteSearchQueryResults 执行搜索查询,以检索已编入索引的网站集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

SharePoint 回收站

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPRecycleBinItem 永久删除所有或某个特定的回收站项 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPRecycleBinItem 根据上下文返回回收站项 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPRecycleBinItem 将当前网站集的第一阶段回收站中的所有项或特定项移到第二阶段回收站 SharePoint Online
@SharePointPnPPowerShell 还原 PnPRecycleBinItem 将提供的回收站项还原到其原始位置 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTenantRecycleBinItem 返回租户范围内的回收站中的所有新式和经典网站集 SharePoint Online

SharePoint Webhook

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPWebhookSubscription 添加新的 Webhook 订阅 SharePoint Online
@SharePointPnPPowerShell PnPWebhookSubscription 从资源中删除 Webhook 订阅 SharePoint Online
@SharePointPnPPowerShell PnPWebhookSubscription 更新 Webhook 订阅 SharePoint Online
@SharePointPnPPowerShell PnPWebhookSubscriptions 获取资源的所有 Webhook 订阅 SharePoint Online

网站

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPAppSideLoading 在网站上启用应用程序旁加载功能 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPAuditing 获取网站的审核设置 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPAuditing 设置网站的审核设置 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPCommSite 在经典团队网站上启用新式通信网站体验。 SharePoint Online
@SharePointPnPPowerShell PnPOffice365GroupAliasIsUsed 测试是否已使用给定的别名 SharePoint Online
@SharePointPnPPowerShell PnPRoleDefinition 将角色定义添加到当前上下文中的网站集 (权限级别) SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPRoleDefinition 检索网站的角色定义 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPRoleDefinition 从网站中删除角色定义 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。 PnPSharingForNonOwnersOfSite 将网站配置为仅允许所有者共享网站和网站中的项目 SharePoint Online
@SharePointPnPPowerShell PnPSharingForNonOwnersOfSite 如果网站和网站中的项目的共享仅限于所有者或 $true (如果允许成员和所有者共享),则返回 $false。 SharePoint Online
@SharePointPnPPowerShell 运行 new-pnpsite 根据上下文返回当前网站集。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell 运行 new-pnpsite 设置网站集属性。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSiteCollectionAdmin 将一个或多个用户作为网站集管理员添加到当前上下文中的网站集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSiteCollectionAdmin 返回当前上下文中网站集的当前网站集管理员 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSiteCollectionAdmin 从当前上下文中的网站集删除一个或多个用户作为网站集管理员 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSolution 在网站集中安装沙盒解决方案。警告!因为此方法用于激活解决方案,所以可能会删除组合外观库。建议仅在认为此影响没有问题的情况下才使用这个 cmdlet。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPSolution 从网站集卸载沙盒解决方案 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTeamsTeam 将团队团队添加到现有组 "已连接"、"网站集" SharePoint Online

分类

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPSiteCollectionTermStore 返回网站集术语库 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTaxonomy 将分类导出为输出或文件。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。 PnPTaxonomy 使用字符串数组或文件导入分类 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTaxonomyFieldValue 设置列表项字段中的分类术语值 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTaxonomyItem 返回分类项 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTaxonomyItem 删除分类项 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTaxonomySession 返回分类会话 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTerm 返回分类术语 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTerm 创建分类术语 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTermGroup 返回分类术语组 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTermGroup 创建分类术语组 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTermGroup 删除分类术语组及其包含的所有术语集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。 PnPTermGroupFromXml 使用输入或 XML 文件导入分类术语组。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTermGroupToXml 将分类术语组导出为输出或 XML 文件。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTermLabel 为分类术语创建本地化标签 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTermSet 返回分类术语集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。 PnPTermSet 使用标准格式的文件导入分类术语集。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTermSet 创建分类术语集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

租户管理

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPAppCatalogSite 创建新的应用程序目录网站,并将此网站设置为租户应用程序目录 SharePoint Online
@SharePointPnPPowerShell PnPGraphAccessToken 返回 Microsoft Graph API 的当前 OAuth 访问令牌 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPHideDefaultThemes 如果 default/OOTB 主题应对用户可见,则返回。 SharePoint Online
@SharePointPnPPowerShell PnPHideDefaultThemes 定义默认的/OOTB 主题是否应对用户可见。 SharePoint Online
@SharePointPnPPowerShell PnPHomeSite 返回租户的主网站 url SharePoint Online
@SharePointPnPPowerShell PnPHomeSite 将当前设置的网站作为主网站删除 SharePoint Online
@SharePointPnPPowerShell PnPHomeSite 为租户设置主网站 SharePoint Online
@SharePointPnPPowerShell PnPHubSite 检索全部或特定的 hubsite。 SharePoint Online
@SharePointPnPPowerShell PnPHubSite 将网站注册为 hubsite SharePoint Online
@SharePointPnPPowerShell PnPHubSite 设置中心网站属性 SharePoint Online
@SharePointPnPPowerShell PnPHubSite 将网站注销为 hubsite SharePoint Online
@SharePointPnPPowerShell PnPHubSiteAssociation 将网站连接到 hubsite。 SharePoint Online
@SharePointPnPPowerShell PnPHubSiteAssociation 断开网站与 hubsite 的连接。 SharePoint Online
@SharePointPnPPowerShell PnPHubSiteChild 检索链接到特定中心网站的所有网站 SharePoint Online
@SharePointPnPPowerShell PnPHubSiteRights 向已准备好的权限授予对一个或多个特定用户的中心网站的其他权限 SharePoint Online
@SharePointPnPPowerShell PnPHubSiteRights 废除为一个或多个特定用户将网站与中心网站关联的权限已存在的权限 SharePoint Online
@SharePointPnPPowerShell PnPIsSiteAliasAvailable 验证某个别名是否仍可用于为创建新的网站集。 如果不是,它将建议其他别名和 URL 仍然可用。 SharePoint Online
@SharePointPnPPowerShell PnPKnowledgeHubSite 获取租户的知识中心网站 URL SharePoint Online
@SharePointPnPPowerShell PnPKnowledgeHubSite 删除租户的知识中心网站设置 SharePoint Online
@SharePointPnPPowerShell PnPKnowledgeHubSite 为租户设置知识中心网站 SharePoint Online
@SharePointPnPPowerShell PnPMicrosoft365GroupToSite 通过为其创建 Microsoft 365 组并将网站与新创建的组连接,Groupifies 为经典团队网站。 SharePoint Online
@SharePointPnPPowerShell PnPOrgAssetsLibrary 将给定的文档库添加为组织资产源 SharePoint Online
@SharePointPnPPowerShell PnPOrgAssetsLibrary 返回所有已配置的组织资源库的列表 SharePoint Online
@SharePointPnPPowerShell PnPOrgAssetsLibrary 将给定文档库作为组织资产源进行删除 SharePoint Online
@SharePointPnPPowerShell PnPOrgNewsSite 在租户中将网站添加为组织新闻源 SharePoint Online
@SharePointPnPPowerShell PnPOrgNewsSite 返回所有已配置的组织新闻网站的列表。 SharePoint Online
@SharePointPnPPowerShell PnPOrgNewsSite 从组织新闻网站的列表中删除给定网站。 SharePoint Online
@ SharePointPnPPowerShell.Initialize-PnPPowerShellAuthentication 初始化 Azure AD 应用,并根据需要创建新的自签名证书以用于应用程序注册。 SharePoint Online
@SharePointPnPPowerShell。 PnPPowerShellTelemetry 禁用 PnP PowerShell 遥测跟踪 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPPowerShellTelemetry 启用 PnP PowerShell 遥测跟踪。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPPowerShellTelemetryEnabled 如果 PnP PowerShell 遥测已启用,则返回 true。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell 运行 new-pnpsite 创建通信网站或与 Microsoft 365 组连接的团队网站 SharePoint Online
@SharePointPnPPowerShell PnPSiteCollectionAppCatalog 将网站集范围内的应用程序目录添加到网站 SharePoint Online
@SharePointPnPPowerShell PnPSiteCollectionAppCatalog 从网站中删除网站集范围内的应用程序目录 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesign 在当前租户上创建新的网站设计。 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesign 检索已在当前租户上注册的网站设计。 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesign 将网站设计应用于现有网站。 需要租户管理权限 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesign 删除网站设计 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesign 更新当前租户上的网站设计。 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesignRights 返回具有针对特定网站设计的设计权限的主体 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesignRights 授予指定主体使用网站设计的权限。 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesignRights 撤销指定主体对使用网站设计的权限。 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesignRun 检索应用于指定网站集的网站设计的列表。 如果未指定 WebUrl 参数,我们将显示应用于当前网站的设计的列表。 返回的输出包括计划作业的 ID、web 和网站 Id 以及网站设计 ID、版本和标题。 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesignRunStatus 检索并显示对应用于网站的指定网站设计执行的所有网站脚本操作的列表。 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesignTask 此命令用于将已发布的网站设计应用于指定的网站集目标。 它将计划操作,允许应用大型网站脚本 (PnPSiteDesign 限制为30个操作和子操作) 。 此命令用于替换 Invoke-PnPSiteDesign,当您需要应用大量操作或多个网站脚本时,此命令很有用。 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesignTask 用于检索计划的网站设计脚本。 它采用计划网站设计任务的 ID 和计划应用网站设计的网站的 URL。 SharePoint Online
@SharePointPnPPowerShell PnPSiteDesignTask 删除网站设计任务。 如果已启动关联网站脚本的执行,则不会终止执行。 SharePoint Online
@SharePointPnPPowerShell PnPSiteScript 在当前租户上创建新的网站脚本。 SharePoint Online
@SharePointPnPPowerShell PnPSiteScript 检索已在当前租户上注册的网站脚本。 SharePoint Online
@SharePointPnPPowerShell PnPSiteScript 删除网站脚本 SharePoint Online
@SharePointPnPPowerShell PnPSiteScript 更新当前租户上的现有网站脚本。 SharePoint Online
@SharePointPnPPowerShell PnPSiteScriptFromList 从现有列表生成网站脚本 SharePoint Online
@SharePointPnPPowerShell PnPSiteScriptFromWeb 从现有网站生成网站脚本 SharePoint Online
@SharePointPnPPowerShell PnPStorageEntity 从租户应用程序目录或从当前网站获取存储实体/服务器场属性(如果它具有网站范围应用程序目录)。 SharePoint Online
@SharePointPnPPowerShell PnPStorageEntity 删除租户范围内的应用程序目录或当前网站集的存储实体/服务器场属性(如果网站具有网站集范围内的应用程序目录) SharePoint Online
@SharePointPnPPowerShell PnPStorageEntity 在租户范围内的应用程序目录或网站集应用程序目录中设置存储实体/服务器场属性。 SharePoint Online
@SharePointPnPPowerShell PnPTenant 返回组织级别的网站集属性 SharePoint Online
@SharePointPnPPowerShell PnPTenant 设置组织级别的网站集属性 SharePoint Online
@SharePointPnPPowerShell PnPTenantAppCatalogUrl 删除租户作用域的应用程序目录的 url。 它不会删除网站集本身。 SharePoint Online
@SharePointPnPPowerShell PnPTenantAppCatalogUrl 检索租户作用域的应用程序目录的 url SharePoint Online
@SharePointPnPPowerShell PnPTenantAppCatalogUrl 设置租户作用域的应用程序目录的 url SharePoint Online
@SharePointPnPPowerShell PnPTenantCdnEnabled 检索 Office 365 内容传递网络是否已启用。 SharePoint Online
@SharePointPnPPowerShell PnPTenantCdnEnabled 启用或禁用公共或专用 Office 365 内容传递网络 (CDN) 。 SharePoint Online
@SharePointPnPPowerShell PnPTenantCdnOrigin 向公共或私人内容传递网络 (CDN) 中添加新的来源。 SharePoint Online
@SharePointPnPPowerShell PnPTenantCdnOrigin 从公共或私人内容传递网络 (CDN) 中返回当前注册的来源。 SharePoint Online
@SharePointPnPPowerShell PnPTenantCdnOrigin 从公共或私人内容传递网络 (CDN) 中删除来源。 SharePoint Online
@SharePointPnPPowerShell PnPTenantCdnPolicies 返回指定的 CDN (公共的 CDN 策略 私有) 。 SharePoint Online
@SharePointPnPPowerShell PnPTenantCdnPolicy 将指定 CDN (的 CDN 策略设置为 Public 私有) 。 SharePoint Online
@SharePointPnPPowerShell PnPTenantId 返回租户 ID SharePoint Online
@SharePointPnPPowerShell PnPTenantRecycleBinItem 从租户范围内的回收站中永久删除网站集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell 还原 PnPTenantRecycleBinItem 从租户范围内的回收站还原网站集 SharePoint Online
@SharePointPnPPowerShell。 PnPTenantServicePrincipal 启用当前租户的 "SharePoint Online 客户端" 服务主体。 SharePoint Online
@SharePointPnPPowerShell PnPTenantServicePrincipal 启用当前租户的 "SharePoint Online 客户端" 服务主体。 SharePoint Online
@SharePointPnPPowerShell PnPTenantServicePrincipal 返回当前租户的 "SharePoint Online 客户端" 服务主体。 SharePoint Online
@SharePointPnPPowerShell PnPTenantServicePrincipalPermission 吊销之前授予 "SharePoint Online Client" 服务主体的权限。 SharePoint Online
@SharePointPnPPowerShell PnPTenantServicePrincipalPermissionGrants 获取 "SharePoint Online 客户端" 服务主体的权限授予集合 SharePoint Online
@SharePointPnPPowerShell 批准-PnPTenantServicePrincipalPermissionRequest 批准当前租户的 "SharePoint Online 客户端" 服务主体的权限请求 SharePoint Online
@SharePointPnPPowerShell 拒绝 PnPTenantServicePrincipalPermissionRequest 拒绝对当前租户的 "SharePoint Online Client" 服务主体的权限请求 SharePoint Online
@SharePointPnPPowerShell PnPTenantServicePrincipalPermissionRequests 获取 "SharePoint Online 客户端" 服务主体的权限请求的集合 SharePoint Online
@SharePointPnPPowerShell PnPTenantSite 检索网站信息。 SharePoint Online、SharePoint 2016、SharePoint 2019
@SharePointPnPPowerShell PnPTenantSite 为当前租户新建(传统型)网站集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTenantSite 删除网站集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTenantSite 更新网站集的设置 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPTenantSyncClientRestriction 返回组织级别的 OneDrive 同步限制设置 SharePoint Online
@SharePointPnPPowerShell PnPTenantSyncClientRestriction 设置组织级别同步客户端限制属性 SharePoint Online
@SharePointPnPPowerShell PnPTenantTheme 向租户添加主题或更新主题。 SharePoint Online
@SharePointPnPPowerShell PnPTenantTheme 返回全部或特定主题 SharePoint Online
@SharePointPnPPowerShell PnPTenantTheme 删除主题 SharePoint Online
@SharePointPnPPowerShell PnPTimeZoneId 返回时区 ID SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell Get-pnpwebtemplates 返回可用的经典 web 模板 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

用户和组管理

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPAlert 为用户向列表添加通知 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPAlert 返回用户的注册警报。 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPAlert 删除用户的通知 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPGroup 返回网站中的特定 SharePoint 组或所有 SharePoint 组。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPGroup 将组添加到网站用户组列表,并返回组对象 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPGroup 从网站中删除组。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPGroup 更新组 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPGroupMembers 检索组的所有成员 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPGroupPermissions 返回特定 SharePoint 组的权限 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPGroupPermissions 添加和/或删除特定 SharePoint 组的权限 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPUser 返回当前网站的网站用户 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPUser 将用户添加到内置的网站用户信息列表,并返回用户对象 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPUser 从 "网站集用户信息" 列表中删除特定用户 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPUserFromGroup 从组中删除用户 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPUserToGroup 将用户添加到 SharePoint 组 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

用户配置文件

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPPersonalSite 仅限 Office365:创建个人/OneDrive For Business 网站 SharePoint Online
@SharePointPnPPowerShell PnPUPABulkImportJob 提交新的用户配置文件批量导入作业。 SharePoint Online
@SharePointPnPPowerShell PnPUPABulkImportStatus 获取用户配置文件批量导入状态。 SharePoint Online
@SharePointPnPPowerShell PnPUserOneDriveQuota 检索特定用户的 OneDrive for business 网站上的当前配额集 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPUserOneDriveQuota 为特定用户设置 OneDrive for business 网站上的配额 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell 重置 PnPUserOneDriveQuotaToDefault 将特定用户的 OneDrive for business 网站上的当前配额集重置为租户默认值 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPUserProfileProperty 若要使用此 cmdlet,您必须连接到租户管理网站 (https://:<tenant>-admin.sharepoint.com) 使用 Connect-PnPOnline。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPUserProfileProperty 仅限 Office365:使用租户 API 检索网站信息。 您必须连接到租户管理网站 (https://:<tenant>-admin.sharepoint.com) 与 Connect-PnPOnline,才能使用此命令。 SharePoint Online

实用程序

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPMail 使用 Office 365 SMTP 服务或 SharePoint 发送电子邮件,具体取决于指定的参数。 有关详细信息,请参阅详细帮助。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

Web 部件

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPClientSideComponent 从网站页面检索一个或多个 Client-Side 组件 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPClientSideComponent 从页面中删除 Client-Side 组件 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPClientSideText 设置 Client-Side 文本组件属性 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPClientSideWebPart 设置 Client-Side Web 部件属性 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPWebPart 返回 web 部件定义对象 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWebPart 从页面中删除 web 部件 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWebPartProperty 返回 Web 部件属性 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWebPartProperty 设置 Web 部件属性 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWebPartToWebPartPage 将 web 部件添加到指定区域中的 web 部件页 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWebPartToWikiPage 将 web 部件添加到指定的表格行和列中的 wiki 页面 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWebPartXml 返回在网站上注册的 web 部件的 web 部件 XML SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

Webs

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPAvailableLanguage 返回当前网站上的可用语言 SharePoint Online,SharePoint 2019
@SharePointPnPPowerShell PnPIndexedProperties 标记要编入搜索索引的属性包的值。请注意,这将覆盖现有标志,即只将使用此 cmdlet 定义的属性编入索引。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPIndexedProperty 标记要编入搜索索引的指定属性包键的值。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPIndexedProperty 删除要编入搜索索引的属性包中的键。键及其值会保留在属性包中,但不再会编入索引。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPIndexedPropertyKeys 返回已标记要编入搜索索引的属性包值的键 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPPropertyBag 返回属性包值。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPPropertyBagValue 从属性包中删除值 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPPropertyBagValue 设置属性包值 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPReIndexWeb 将网站标记为在下次增量爬网过程中进行完整索引 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPRequestAccessEmails 返回请求访问电子邮件地址 SharePoint Online
@SharePointPnPPowerShell PnPRequestAccessEmails 设置 web 上的请求访问电子邮件 SharePoint Online
@SharePointPnPPowerShell PnPSubWebs 返回当前网站的子网站 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWeb 返回当前网站对象 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWeb 在当前网站下新建子网站 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWeb 删除当前网站中的子网站 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWeb 设置网站上的属性 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWebAction 对网站、列表和列表项执行操作。 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWebPermission 设置权限 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

工作流

Cmdlet 说明 平台
@SharePointPnPPowerShell PnPWorkflowDefinition 添加工作流定义 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWorkflowDefinition 返回工作流定义 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWorkflowDefinition 删除工作流定义 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWorkflowInstance 获取 SharePoint 2010/2013 工作流实例 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。 Resume-PnPWorkflowInstance 恢复工作流 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell。 PnPWorkflowInstance 在列表项上启动 SharePoint 2010/2013 工作流实例 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWorkflowInstance 停止工作流实例 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWorkflowSubscription 向列表添加工作流订阅 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWorkflowSubscription 返回工作流订阅 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online
@SharePointPnPPowerShell PnPWorkflowSubscription 删除 SharePoint 2010/2013 工作流订阅 SharePoint Server 2013,SharePoint Server 2016,SharePoint Server 2019,SharePoint Online

其他资源