How to using Powershell and Windows Network QoS policy to Throttle HTTP (80) ,HTTPS (443),SMB (445) , SUP (8530) and SUP1 (8531) for SCCM 2012 client installation and policy

Check out a very simple batch script that  will throttle Port 80 HTTP and  443 HTTPS  to 1000KB:

powershell.exe -executionpolicy bypass “New-netqospolicy -Name ‘HTTP’ -IPPort 80 -IPProtocol TCP -ThrottleRateActionBitsPerSecond 1000KB”

powershell.exe -executionpolicy bypass “New-netqospolicy -Name ‘HTTPS’ -IPPort 443 -IPProtocol TCP -ThrottleRateActionBitsPerSecond 1000KB”

powershell.exe -executionpolicy bypass “New-netqospolicy -Name ‘SMB’ -IPPort 445 -IPProtocol TCP -ThrottleRateActionBitsPerSecond 1000KB”

powershell.exe -executionpolicy bypass “New-netqospolicy -Name ‘SUP’ -IPPort 8530 -IPProtocol TCP -ThrottleRateActionBitsPerSecond 1000KB”

powershell.exe -executionpolicy bypass “New-netqospolicy -Name ‘SUP1’ -IPPort 8531 -IPProtocol TCP -ThrottleRateActionBitsPerSecond 1000KB”.

powershell.exe -executionpolicy bypass “New-netqospolicy -Name ‘CNT’ -IPPort 10123 -IPProtocol TCP -ThrottleRateActionBitsPerSecond 1000KB”


You can modify “1000KB” to any percentage of your total bandwidth available

This is a permanent bandwidth throttle policy that will stay in place until manually removed.

To remove, simply run ‘Remove-NetQosPolicy “HTTPS” -a’ and ‘Remove-NetQosPolicy “HTTP” -a’ from an elevated PowerShell prompt. 

Remove-NetQosPolicy “HTTP” -a
Remove-NetQosPolicy “HTTPS” -a
Remove-NetQosPolicy “SMB” -a
Remove-NetQosPolicy “SUP” -a
Remove-NetQosPolicy “SUP1” -a
Remove-NetQosPolicy “CNT” -a

To view, you can run Get-NetQosPolicy to see all QoS policies in place.

The following is after QoS Policy view in Task Manager.0% of utilization.

image

Post a Comment

0 Comments