COMMAND EVERYTHING.
Creates a new network QoS policy.
Microsoft NetQos reference: Creates a new network QoS policy. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for New-NetQosPolicy. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Windows / NetQos · Windows Server 2025 documentation; feature/module prerequisites apply
-AppPathNameMatchCondition- Specifies the name by which an application is run, such as application.exe or %ProgramFiles%\application.exeapplication.
-AsJob- Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
-CimSession- Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
-Cluster (required)- Specifies the Microsoft Windows Cluster service, which uses the Cluster network driver TCP/UDP port 3343.
-Confirm- Prompts you for confirmation before running the cmdlet.
-DSCPAction- Specifies the differentiated services code point (DSCP) value. The acceptable values for this parameter are: 0 through 63.
-Default (required)- Specifies a wildcard filter that can be used to capture all traffic that is not matched by any other filter. One use case is that a user can create a QoS policy for a specific application using the *AppPathNameMatchCondition* parameter and create another QoS policy for all other applications using this parameter. Another use case is that a user can create several QoS policies, each of which specifies a minimum bandwidth action for the filtered traffic, and create one additional policy using this parameter to assign a minimum bandwidth action for all other traffic.
-FCOE (required)- Specifies the Fibre Channel over Ethernet (FCoE), which uses a dedicated EtherType 0x8914. If this parameter is specified, then the Windows Server® 2012 and later will instruct the network adapters in the computer that support FCoE to match the FCoE packets and apply the action specified in the policy.
-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.
-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.
-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.
-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.
-IPPortMatchCondition (required)- 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 the QoS 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 the IPPortMatchCondition parameter value of 80 matches HTTP traffic sent by both HTTP clients and HTTP servers.
-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 condition. The QoS policy will apply to both TCP and UDP traffic.
-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.
-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.
-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.
-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.
-LiveMigration (required)- Specifies the Microsoft live migration, which uses the well-known TCP port 6600.
-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.
-NFS (required)- Specifies the network file system, which uses the dedicated TCP port 2049.
-Name (required)- Specifies the QoS policy name. This name must be unique for a QoS policy.
-NetDirectPortMatchCondition (required)- 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 and later will send a Network Direct policy to a network adapter only if the network adapter supports Network Direct.
-NetworkProfile- Specifies the profile, or connection type, of a network, such as Domain. 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.
-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 If a policy is stored in ActiveStore, then the policy does not persist after restart.
-Precedence- Specifies the priority of a QoS policy. A higher priority policy will trump a lower priority policy in case the policies are conflicting. The acceptable values for this parameter are: 0 through 255. 255 represents the highest priority and 0 represents the lowest. If not specified, then the default value is 127.
-PriorityValue8021Action (required)- Specifies the IEEE 802.1p value. The acceptable values for this parameter are: 0 through 7.
-SMB (required)- Specifies the server message block, which uses the dedicated TCP port 445.
-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 PowerShell® 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.
-ThrottleRateActionBitsPerSecond- Specifies a throttle rate in bits per second to set the maximum bandwidth that can be consumed.
-URIMatchCondition (required)- 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.
-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.
-UserMatchCondition- Specifies the user or group name in Active Directory, such as contoso\DavidChew. This parameter is usually specified with another filtering parameter such as the *AppPathNameMatchCondition* parameter.
-WhatIf- Shows what would happen if the cmdlet runs. The cmdlet is not run.
-iSCSI (required)- Specifies the internet small computer system interface (iSCSI), which uses the dedicated TCP port 3260.
Windows with the NetQos module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.