New-SPWOPISuppressionSetting

为当前 SharePoint 场中指定的操作、文件扩展名或编程标识符禁用 Office Web 应用。

语法

New-SPWOPISuppressionSetting
   [-Action <String>]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-Extension <String>]
   [-ProgId <String>]
   [-WhatIf]
   [<CommonParameters>]

说明

New-SPWOPISuppressionSetting cmdlet 关闭当前 SharePoint 场中指定的操作、文件扩展名或编程标识符 (ProgId) 的 Office Web 应用。 此 cmdlet 无需删除发现信息或用户使用 SharePoint Share by link 功能发送指向文档的链接并允许收件人使用该文档类型的 Office Web 应用。 如果想要使用Excel Services查看 Excel 工作簿而不是 WOPI 应用程序 ((例如 Office Web 应用 服务器) ),则可能必须使用此 cmdlet。

有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet

示例

------------------示例-----------------------

New-SPWOPISuppressionSetting -Extension "XLSX" -Action "view"
New-SPWOPISuppressionSetting -Extension "XLS" -Action "view"

此示例禁止用户使用 Office Web Apps查看文件扩展名为".xlsx"或".xls"的 Excel 工作簿。

参数

-Action

指定要为给定扩展或编程标识符 (ProgId) 禁止的操作。

例如,"view"、"edit"和"embedview"。 有关操作的完整列表,请运行 Get-SPWOPIBinding

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

-Confirm

执行命令前,看到确认提示。 有关详细信息,请键入以下命令:get-help about_commonparameters

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

-Extension

指定要禁止显示的文件扩展名。

运行 Get-SPWOPIBinding 以获取 WOPI 应用程序支持的文件扩展名列表。

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

-ProgId

指定要禁止显示的应用程序的编程标识符 (ProgId)。

运行 Get-SPWOPIBinding 以获取 WOPI 应用程序支持的 ProgIds 列表。

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

-WhatIf

显示一条描述命令作用的消息,而不执行命令。 有关详细信息,请键入以下命令: get-help about_commonparameters

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
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.

When the Global parameter is used, all objects are contained in the global store. 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