NAME
Set-NetQosPolicy
SYNOPSIS
Updates the Quality of Service (QoS) policy settings.SYNTAX
Set-NetQosPolicy [[-Name]
] [-AppPathNameMatchCondition ] [-AsJob] [-CimSession ] [-DSCPAction
] [-IPDstPortEndMatchCondition ] [-IPDstPortMatchCondition ] [-IPDstPortStartMatchCondition
] [-IPDstPrefixMatchCondition ] [-IPPortMatchCondition ] [-IPProtocolMatchCondition
] [-IPSrcPortEndMatchCondition ] [-IPSrcPortMatchCondition ] [-IPSrcPortStartMatchCondition
] [-IPSrcPrefixMatchCondition ] [-MinBandwidthWeightAction ] [-NetDirectPortMatchCondition
] [-NetworkProfile ] [-PassThru] [-PolicyStore ] [-Precedence
] [-PriorityValue8021Action ] [-TemplateMatchCondition ] [-ThrottleLimit
] [-ThrottleRateActionBitsPerSecond ] [-URIMatchCondition ] [-URIRecursiveMatchCondition
] [-UserMatchCondition ] [-Confirm] [-WhatIf] [ ] Set-NetQosPolicy [-AppPathNameMatchCondition
] [-AsJob] [-CimSession ] [-DSCPAction ] [-IPDstPortEndMatchCondition
] [-IPDstPortMatchCondition ] [-IPDstPortStartMatchCondition
] [-IPDstPrefixMatchCondition ] [-IPPortMatchCondition ] [-IPProtocolMatchCondition
] [-IPSrcPortEndMatchCondition ] [-IPSrcPortMatchCondition ] [-IPSrcPortStartMatchCondition
] [-IPSrcPrefixMatchCondition ] [-MinBandwidthWeightAction ] [-NetDirectPortMatchCondition
] [-NetworkProfile ] [-PassThru] [-Precedence ] [-PriorityValue8021Action
] [-TemplateMatchCondition ] [-ThrottleLimit ] [-ThrottleRateActionBitsPerSecond
] [-URIMatchCondition ] [-URIRecursiveMatchCondition ] [-UserMatchCondition
] -InputObject [-Confirm] [-WhatIf] [ ] DESCRIPTION
The Set-NetQosPolicy cmdlet modifies an existing Quality of Service (QoS) policy. Match conditions or actions or
general parameters of the policy such as NetworkProfile or Precedence can be changed. Users cannot change the location of where an existing QoS policy is stored. Changing the PolicyStore parameter value will fail. If a policy was created to be in ActiveStore and a user attempts to make it persistent, such as storing the policy on the local computer, the user has to create a new policy and place it on the local computer (localhost). If the PolicyStore parameter is not specified, then the cmdlet will search for and update the policy on the local computer (localhost).PARAMETERS
-AppPathNameMatchCondition
Specifies the name by which an application is run in Windows Serverr 2012, such as application.exe or%ProgramFiles%\application.exe.
Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-AsJob [
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You] can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get
the job results, use the Receive-Job cmdlet.
For more information about Windows PowerShellr background jobs, see about_Jobs. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false-CimSession
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, suchas the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local
computer. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false-DSCPAction
Specifies the differentiated services code point (DSCP) value. A valid DSCP value is in the range between 0and 63. In addition, users can enter -1 to remove the DSCP setting from the policy.
Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-InputObject
Specified the object which will be modified by this cmdlet. The object must be piped to the cmdlet. Required? true Position? named Default value Accept pipeline input? True (ByValue) Accept wildcard characters? false-IPDstPortEndMatchCondition
Specifies the last port in a range of destination ports to be used to match the network traffic. This parameter must be used in conjunction with the IPDstPortStartMatchCondition parameter. The value of this parameter also must be larger than the value of the IPDstPortStartMatchCondition parameter. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-IPDstPortMatchCondition
Specifies the exact destination port to be used to match the network traffic. The filter of a QoS policy can be based on either a single port or a range of ports. To specify a single destination port, use this parameter. To specify a range of destination ports, use both the IPDstPortStartMatchCondition and the IPDstPortEndMatchCondition parameters. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false-IPDstPortStartMatchCondition
Specifies the first port in a range of destination ports to be used to match the network traffic. This parameter must be used in conjunction with the IPDstPortEndMatchCondition parameter. The value of this parameter also must be smaller than the value of the IPDstPortEndMatchCondition parameter. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-IPDstPrefixMatchCondition
Specifies the destination IP address, optionally with a network prefix, such as 1.2.3.4, 3ffe:ffff::1, 192.168.1.0/24, or fe80::1234/48. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-IPPortMatchCondition
Specifies the port to be used to match the network traffic, it can be either source port or destination port. If either the source port or the destination port in a packet matches the value of this parameter, then theQoS policy will apply to the packet. Usually this is a well-known port that a client uses to communicate with
a server. With this parameter specified, the same QoS policy can be configured on both the clients and the servers and apply to the traffic in both directions. For example, specifying this parameter value to 80 matches HTTP traffic sent by both HTTP clients and HTTP servers. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-IPProtocolMatchCondition
Specifies the IP protocol to be used to match the network traffic. The acceptable values for this parameter are: TCP, UDP, or Both. If this parameter is unspecified, then Both is the default value. The QoS policy will apply to both TCP and UDP traffic. Required? false Position? named Default value BothAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-IPSrcPortEndMatchCondition
Specifies the last port in a range of source ports to be used to match the network traffic. This parameter must be used in conjunction with the IPSrcPortStartMatchCondition parameter. The value of this parameter also must be larger than the value of the IPSrcPortStartMatchCondition parameter. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-IPSrcPortMatchCondition
Specifies the exact source port to be used to match the network traffic. The filter of a QoS policy can be based on either a single port or a range of ports. To specify a single source port, use this parameter. To specify a range of source ports, use both the IPSrcPortStartMatchCondition and the IPSrcPortEndMatchCondition parameters. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false-IPSrcPortStartMatchCondition
Specifies the first port in a range of source ports to be used to match the network traffic. This parameter must be used in conjunction with the IPSrcPortEndMatchCondition parameter. The value of this parameter also must be smaller than the value of the IPSrcPortEndMatchCondition parameter. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-IPSrcPrefixMatchCondition
Specifies the source IP address, optionally with a network prefix, such as 1.2.3.4, 3ffe:ffff::1, 192.168.1.0/24, or fe80::1234/48. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-MinBandwidthWeightAction
Specifies a numerical value for minimum bandwidth that a flow should get relatively. The actual bandwidth a flow gets will depend on the weights assigned to other flows in the computer. The acceptable values for this parameter are: 1 through 100. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-Name
Specifies the QoS policy name. Required? false Position? 1 Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-NetDirectPortMatchCondition
Specifies the network direct port to be used to match the network traffic. Network Direct uses an independent port space from the TCP or UDP port space. Windows Server 2012 will send a Network Direct policy to a network adapter only if the network adapter supports Network Direct. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-NetworkProfile
Specifies the profile, or connection type, of a network. The acceptable values for this parameter are: Domain, Public, Private, or All. If this parameter is not specified, then the QoS policy will be effective when a computer is connected on any type of connection. Required? false Position? named Default value AllAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-PassThru [
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false] -PolicyStore
Specifies the location of the policy that is stored. The acceptable values for this parameter are:ÿ- ActiveStore
- COMPUTERNAME
- GPO:COMPUTERNAME
- GPO:DOMAIN\GPONAME
- LDAP://LDAP-URL
Required? false Position? named Default value localhost Accept pipeline input? false Accept wildcard characters? false-Precedence
Specifies the priority of a QoS policy. A higher priority policy will override a lower priority policy in case the priorities are conflicting. The acceptable values for this parameter are: 0 through 255. 255 specifies the highest priority and 0 specifies the lowest. If not specified, then the default value is 127. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-PriorityValue8021Action
Specifies the IEEE 802.1p value. A valid 802.1p value is in the range between 0 and 7. In addition, users canenter -1 to remove the 802.1p priority setting from the policy.
Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-TemplateMatchCondition
Specifies a number of filters built in Windows Serverr 2012. The acceptable values for this parameter are: FCoE, iSCSI, LiveMigration, NFS, SMB, or. Note: Refer to the corresponding parameter descriptions for theNew-NetQosPolicy cmdlet.
Required? false Position? named Default value 0Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-ThrottleLimit
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShellr calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false-ThrottleRateActionBitsPerSecond
Specifies a throttle rate in bits per second to set the maximum bandwidth that can be consumed. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-URIMatchCondition
Specifies the URI to match. Only a HTTP URL is currently supported, such as http://myhost, https://*/training,
http://myhost:8080/training, or https://myhost:*/training. The QoS policy will only apply to the traffic sent
from HTTP server applications to HTTP clients in response to the requests from the client for the specified URI. Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-URIRecursiveMatchCondition
Specifies that all subdirectories and files following the URI specified in the URIMatchCondition parameter are to be included. This parameter can be specified only if the URIMatchCondition parameter is specified. Required? false Position? namedDefault value $false
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-UserMatchCondition
Specifies the user or group name in Active Directory, such as contoso\johnj99. This parameter is usuallyspecified with other filtering parameter such as the AppPathNameMatchCondtion parameter.
Required? false Position? named Default valueAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-Confirm [
Prompts you for confirmation before running the cmdlet. Required? false Position? named Default value false Accept pipeline input? false Accept wildcard characters? false] -WhatIf [
Shows what would happen if the cmdlet runs. The cmdlet is not run. Required? false Position? named Default value false Accept pipeline input? false Accept wildcard characters? false] This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216). INPUTS
Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_NetQosPolicySettingData The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object. The MSFT_NetQosPolicySettingData object contains a QoS policy.OUTPUTS
Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_NetQosPolicySettingData The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object. The MSFT_NetQosPolicySettingData object contains a QoS policy. Only when the PassThru parameter is specified will this cmdlet return the MSFT_NetQosPolicySettingData object.EXAMPLE 1
PS C:\> Set-NetQosPolicy -Name "SMB Policy" -NetworkProfile Domain
This example updates the QoS policy named SMB Policy so that it only applies to traffic that is outgoing from adomain-joined network adapter.
EXAMPLE 2
PS C:\> Get-NetQosPolicy -Name "wildcard" | Set-NetQosPolicy -Precedence 250
This example gets the QoS policy named wildcard and updates the precedence of the policy to 250.EXAMPLE 3
PS C:\> Set-NetQosPolicy -Name "Backup" -IPDstPortStart 3501 -IPDstPortEnd 3510
This example updates the QoS policy named Backup with additional matching conditions.EXAMPLE 4
PS C:\> Set-NetQosPolicy -Name "IIS" -Recursive $true -ThrottleRateActionBytesPerSecond 3000KB
This example updates the QoS policy named IIS, so that it applies to the return traffic for both the specified URI and subdirectories and files under the URI. This cmdlet also sets a new throttling rate at 3,000,000 bytes per second. Note: An alias for the ThrottleRateActionBytesPerSecond parameter is ThrottleRateAction. Another alias is MaxBw.RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287437Get-NetQosPolicy
New-NetQosPolicy
Remove-NetQosPolicy