Set-SPWebApplicationHttpThrottlingMonitor
設定指定 Web 應用程式之現有網路節流效能計數器的狀況分數 Bucket 值。
Syntax
Set-SPWebApplicationHttpThrottlingMonitor
[-Identity] <SPWebApplicationPipeBind>
[-Category] <String>
[-Counter] <String>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-HealthScoreBuckets <Double[]>]
[-Instance <String>]
[-IsDESC]
[-LowerLimit <Double>]
[-UpperLimit <Double>]
[-WhatIf]
[<CommonParameters>]
Description
Cmdlet Set-SPWebApplicationHttpThrottlingMonitor
會為指定 Web 應用程式的現有網路節流效能計數器設定健全狀況分數值區值。
如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet。
範例
------------------範例 1------------------
C:\PS>$buckets=(2000,1000,500,300,200,100,50,30,20,10)
Set-SPWebApplicationHttpThrottlingMonitor https://sharepoint -
Category Memory -Counter 'Available Mbytes' -IsDesc -HealthScoreBuckets $buckets
本範例會將 Memory\Available Mbytes 計數器的健康情況分數值區值設定為 Web 應用程式所列出的 https://sharepoint 陣列。
------------------範例 2------------------
Set-SPWebApplicationHttpThrottlingMonitor https://sharepoint
0 -Category Memory -Counter 'Available Mbytes' -IsDesc -UpperLimit 3000
本範例會將 Web 應用程式的 Memory\Available Mbytes 計數器上限設定為 3000,這是 https://sharepoint 健康情況分數貯體中的最高值。
參數
-AssignmentCollection
管理物件以適當處置它們。 使用 SPWeb 或 SPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。 您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。 使用 SPWeb、SPSite 或 SPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。
使用 Global 參數時,所有物件會包含在全域儲存區內。
如果不立即使用物件,或使用 Stop-SPAssignment
命令加以捨棄,則可能會有記憶體不足的狀況發生。
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Category
指定效能計數器目錄的名稱。
此類型必須是節流監視器中有效的效能計數器類別。
使用 Cmdlet Get-SPWebApplicationHttpThrottlingMonitor
可傳回節流監視器中的效能計數器類別清單。
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Confirm
在執行命令之前,提示您確認操作。
如需詳細資訊,請輸入下列命令:get-help about_commonparameters
。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Counter
指定效能計數器的名稱。
此類型必須是節流監視器中有效的效能計數器。
使用 Cmdlet Get-SPWebApplicationHttpThrottlingMonitor
可傳回節流監視器中的效能計數器清單。
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-HealthScoreBuckets
指定用來讓此計數器決定要計算之伺服器狀況分數的 Bucket 範圍。
Type: | Double[] |
Aliases: | Buckets |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Identity
指定要更新的 SharePoint Web 應用程式。
此類型必須是格式為 12345678-90ab-cdef-1234-567890bcdefgh 的有效 GUID;有效的 SharePoint Web 應用程式名稱 (例如 MyOfficeApp1);或有效之 SPWebApplication 物件的執行個體。
Type: | SPWebApplicationPipeBind |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Instance
指定效能計數器的執行個體。 預設值為空。 如果指定值無效,則此 Cmdlet 不會執行。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-IsDESC
指定以遞減順序來解譯此計數器。
如果設定此參數,即會以遞減順序來解譯狀況分數的 Bucket 值。例如,使用 Memory 目錄與 Available Mbytes 計數器來監視可用記憶體以設定此參數。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-LowerLimit
指定所指定之效能計數器數字閾值的下限。 下限是狀況分數的 Bucket 值中最低的值。
Type: | Double |
Aliases: | Lower |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-UpperLimit
指定所指定之效能計數器數字閾值的上限。 上限是狀況分數的 Bucket 值中最高的值。
Type: | Double |
Aliases: | Upper |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-WhatIf
顯示訊息會描述命令的功效而不執行命令。
如需詳細資訊,請輸入下列命令:get-help about_commonparameters
。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |