Archive

Archive for December, 2016

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

December 14, 2016 Leave a comment

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

Advertisements