Networking / Security · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft RemoteAccess reference: Modifies a routing policy configuration. 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 Set-BgpRoutingPolicy. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / RemoteAccess · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-AddCommunity
Specifies an array of Community attribute values. The cmdlet adds the Community attribute values to the BGP routes that match the criteria that you specify for this cmdlet.
-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.
-ClearMED
Indicates that the cmdlet removes the Multi-Exit Discriminator (MED) value from the route advertisements of the BGP routes that match the criteria that you specify for this cmdlet.
-Confirm
Prompts you for confirmation before running the cmdlet.
-Force
Forces the command to run without asking for user confirmation.
-IgnorePrefix
Specifies an array of network prefixes. The cmdlet does not process routes that have the network prefix that you specify.
-MatchASNRange
Specifies a range of autonomous system numbers (ASNs). The cmdlet matches these ASNs with the ASNs in the As-Path attribute in the BGP route advertisements. The cmdlet processes the routes that match these criteria.
-MatchCommunity
Specifies an array of Community attribute values. The cmdlet matches these Community attribute values in the BGP route advertisements. The cmdlet processes the routes that match these criteria.
-MatchNextHop
Specifies an array of Next-Hop attribute values. The cmdlet matches these IP addresses in the BGP route advertisements, and it processes the routes that match these criteria.
-MatchPrefix
Specifies an array of network prefixes. The cmdlet matches these network addresses in the BGP route advertisements and processes the routes that match this criteria.
-Name (required)
Specifies the name of a routing policy.
-NewLocalPref
Specifies a new value of the Local-Pref attribute of the BGP routes that match the criteria that you specify for this cmdlet.
-NewMED
Specifies anew value of the MED attribute of the BGP routes that match the criteria that you specify for this cmdlet.
-NewNextHop
Specifies a new IP address value of the Next-Hop attribute of the BGP routes that match the criteria that you specify for this cmdlet.
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
-PolicyType
Specifies the type of BGP routing policy or the filtering action that the cmdlet applies to the BGP routes that match the criteria that you specify for this cmdlet. The acceptable values for this parameter are: - ModifyAttribute - Allow. The routing policy allows all routes that match the criteria for the BGP best path selection process. - Deny. The routing policy filters and drops all routes that match the criteria from the BGP best path selection process.
-RemoveCommunity
Specifies an array of Community attribute values. The cmdlet removes the Community attribute values from the BGP routes that match the criteria that you specify for this cmdlet.
-RemovePolicyClause
Specified an array of policy clauses. The cmdlet removes these policy clauses from the routing policy.
-RoutingDomain
Specifies a name, as a string, for a routing domain. The name of a routing domain is a unique user-defined alphanumeric string.
-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.
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Prerequisites
Windows with the RemoteAccess module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
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.
This command modifies the routing policy named RTPolicy01. The command sets the ModifyAttribute policy type of the routing policy, and specifies the value 100 for the MED attribute of the BGP routes that match the criteria that you specify for the routing policy. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.