Set-SPAppStoreConfiguration

設定應用程式的 SharePoint 市集 設定。

Syntax

Set-SPAppStoreConfiguration
   [-Url <String>]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-WhatIf]
   -Enable <Boolean>
   [<CommonParameters>]

Description

使用 Set-SPAppStoreConfiguration Cmdlet 來設定指定應用程式的 SharePoint 市集設定。

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

範例

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

Set-SPAppStoreConfiguration -Url https://office.microsoft.com -Enable $true

此範例會將 URL 設為 Office.com 伺服器

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

Set-SPAppStoreConfiguration -Enable $false

此範例會關閉 SharePoint 市集。

--------------------範例 3---------------------

Set-SPAppStoreConfiguration -Enable $true

此範例會開啟 SharePoint 市集。

參數

-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

指定 Office 市集服務是否可尋找或下載協力廠商增益集。

主要讓系統管理員在其 SharePoint 租用戶和網站集合上停用協力廠商增益集的探索和下載。

有效值為 True 及 False。

預設值為 False。

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

-Url

指定要設定 SharePoint 市集設定的應用程式 URL。

除非 Microsoft 代表另外指示,否則請勿變更 SharePoint 存放區的值。

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

輸出

系統.物件