> For the complete documentation index, see [llms.txt](https://docs.parallels.com/landing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubitempreferredroute.md).

# Set-RASPubItemPreferredRoute.md

## NAME

Set-RASPubItemPreferredRoute

## SYNOPSIS

Modifies the specified preferred route for the specified published resource.

## SYNTAX

\*\*Set-RASPubItemPreferredRoute \[[Id](#id-string)] *(uint)* -[PreferredRouteId](#preferredrouteid-string) *(uint)* \[[Description](#description-string) *(string)*] \[[Enabled](#enabled-string) *(bool)*] \[[Name](#name-string) *(string)*] \[-[Priority](#Priority) {Up | Down}] \[[ReferenceId](#referenceid-string) *(uint)*] \[-[ReferenceType](#ReferenceType) {Gateway | HALB | Custom}] \[[SiteId](#siteid-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

\*\*Set-RASPubItemPreferredRoute \[-[InputObject](#inputobject)] *(*[*PubItem*](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/pubitem.md)*)* -[PreferredRouteId](#preferredrouteid-string) *(uint)* \[[Description](#description-string) *(string)*] \[[Enabled](#enabled-string) *(bool)*] \[[Name](#name-string) *(string)*] \[-[Priority](#Priority) {Up | Down}] \[[ReferenceId](#referenceid-string) *(uint)*] \[-[ReferenceType](#ReferenceType) {Gateway | HALB | Custom}] \[[SiteId](#siteid-string) *(uint)*] \[*(*[*CommonParameters*](#CommonParameters)*)*]

## DESCRIPTION

This cmdlet modifies the specified preferred route for the specified published resource.

To add a preferred route, use the Add-RASPubItemPreferredRoute cmdlet.

## PARAMETERS

## PreferredRouteId (uint)

The ID of the Preferred Route to be modified.

```
        Required?                    true

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Name (string)

The Name of the Preferred Route

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Description (string)

Description of the Preferred Route

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Enabled (bool)

Whether the Preferred Route is enabled or not

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ReferenceType ([RoutingType](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/routingtype.md))

Reference Type of the Preferred Route

Possible values: Gateway, HALB, Custom

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ReferenceId (uint)

Reference ID of the Preferred Route

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Priority ([MoveDirection](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/movedirection.md))

The direction to move the Publishing Route object: Up or Down (changes the priority of the Publishing Route accordingly)

Possible values: Up, Down

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Id (uint)

Published resource ID.

```
        Required?                    true

        Position?                    0

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## InputObject ([PubItem](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/pubitem.md))

An object specifying the published resource.

To obtain the object, use the Get-PubItem cmdlet.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       true (ByValue)

        Accept wildcard characters?  false
```

## SiteId (uint)

Site ID.

```
        Required?                    false

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

(CommonParameters)

```
        This cmdlet supports the common parameters: Verbose, Debug,

        ErrorAction, ErrorVariable, WarningAction, WarningVariable,

        OutBuffer, PipelineVariable, and OutVariable. For more information, see 

        about_CommonParameters documentation. 
```

## INPUTS

[PubItem](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/pubitem.md)

## OUTPUTS

-none-

## EXAMPLES

\*\*---------- EXAMPLE 1 ----------

Set-RASPubItemPreferredRoute -Id 12 -PreferredRouteId 1 -Enabled $False

Disable the preferred route with ID 1 for the published resource specified with ID 12.

## RELATED LINKS

* [Get-RASPubItem](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-raspubitem.md)
* [Add-RASPubItemPreferredRoute](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/add-raspubitempreferredroute.md)
* [Get-RASPubItemFilter](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-raspubitemfilter.md)
* [Remove-RASPubItemPreferredRoute](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/remove-raspubitempreferredroute.md)
* [New-RASCustomRoute](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rascustomroute.md)
* [Get-RASCustomRoute](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rascustomroute.md)
* [Set-RASCustomRoute](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rascustomroute.md)
* [Remove-RASCustomRoute](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/remove-rascustomroute.md)
* [Get-RASGateway](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasgateway.md)
* [Get-RASHALB](/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rashalb.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubitempreferredroute.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
