How to remove old StaticRoute for a particular sipuri and add new

a) Before you start , take the backup of static route using below cmdlet

Get-CsStaticRoutingConfiguration | Export-Clixml C:\Temp\StaticRout_Backup.xml

Get-CsStaticRoutingConfiguration | Select-Object -ExpandProperty route | Out-File C:\Temp\Stati.txt

b) Find out the SIPUri which need to remove:-

  • Below cmdlet will provide all the static route  configured in the Lync Topology, and choose sipuri name which need to remove

Get-CsStaticRoutingConfiguration | Select-Object -ExpandProperty route

     Get-CsStaticRoutingConfiguration -Identity   Service:Registrar:LYNCPOOL-FQDN | Select-Object -ExpandProperty route | Where-Object{$_.matchuri -eq “vcservice”}

c) Take output of StaticRoute into a vairiable using belowcmdlet

$apmatchuri = Get-CsStaticRoutingConfiguration -Identity Service:Registrar:LYNCPOOL-FQDN | Select-Object -ExpandProperty route | Where-Object{$_.matchuri -eq “vcservice”}

d) Use below cmdlet to remove route for required Sipuri (example :- vcservice)

Set-CsStaticRoutingConfiguration -identity Service:Registrar:LYNCPOOL-FQDN -Route @{Remove=$apmatchuri}

e) Verify output to make sure the route is removed

Get-CsStaticRoutingConfiguration -Identity Service:Registrar:LYNCPOOL-FQDN | Select-Object –ExpandProperty

f) Add new static route with new DMA name , use below cmdlet

$routePool = New-CsStaticRoute -TLSRoute -destination “dma-FQDN” -port 5061 -matchuri “vcservice” -usedefaultcertificate $true

Set-CsStaticRoutingConfiguration -identity service:Registrar:LyncPool-FQDN -route @{Add=$routePool}

g) Verify that new route is added and shoing in below cmdlet.

Get-CsStaticRoutingConfiguration -Identity Service:Registrar:LYNCPOOL-FQDN | Select-Object –ExpandProperty

2 thoughts on “How to remove old StaticRoute for a particular sipuri and add new

Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

Office 365 for IT Pros

The only always up-to-date book about the cloud Office system in Microsoft 365 covering Exchange Online, SharePoint Online, OneDrive for Business, Microsoft Teams, Planner, Azure Active Directory, and more

Chirag Patel

Microsoft 365 Specialist

All about Microsoft 365 & Teams

lEt's eNaBle MoDeRn WoRkPlAcE !

The WordPress.com Blog

The latest news on WordPress.com and the WordPress community.

%d bloggers like this: