Set-SPAppAcquisitionConfiguration

設定應用程式擷取設定

Syntax

Set-SPAppAcquisitionConfiguration
   -Enable <Boolean>
   -SiteSubscription <SPSiteSubscriptionPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Set-SPAppAcquisitionConfiguration
   -Enable <Boolean>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   -WebApplication <SPWebApplicationPipeBind>
   [-WhatIf]
   [<CommonParameters>]

Description

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet parameter sets.

使用 Set-SPAppAcquisitionConfiguration Cmdlet 從 SharePoint 市集或應用程式類別目錄設定應用程式擷取設定。

如需 SharePoint 產品Windows PowerShell的許可權和最新資訊,請參閱 SharePoint Server 2016 Windows PowerShell線上檔,SharePoint Server 2019參考 (https://go.microsoft.com/fwlink/p/?LinkId=671715) 。

範例

--------------------範例 1---------------------

Set-SPAppAcquisitionConfiguration -WebApplication https://localhost -Enable:$false

此範例已停用指定 Web 應用程式的應用程式購買。

--------------------範例 2---------------------

Set-SPAppAcquisitionConfiguration -SiteSubscription https://localhost/sites/SharePointOnlineAdmin1 -Enable:$false

此範例會停用指定租使用者的應用程式購買。

參數

-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.

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

-Confirm

執行 Cmdlet 之前提示您確認。

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

-Enable

指定要啟用或停用擷取功能。

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

-SiteSubscription

指定要設定應用程式擷取設定的網站集合。

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

-WebApplication

指定要設定擷取設定的 Web 應用程式。

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

-WhatIf

顯示執行 Cmdlet 時會發生什麼情況。 未執行 Cmdlet。

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

輸入

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

Microsoft.SharePoint.PowerShell.SPSiteSubscriptionPipeBind Microsoft.SharePoint.PowerShell.SPAssignmentCollection

輸出

系統.物件