Back to Learning
Windows · PowerShellBeginner

PowerShell: Inspect and Remove a Bad Route

A stale host route diverts one server through an offline VPN. Find the exact prefix and remove only that route. Work through it yourself in the live host terminal below.

Interactive simWindowsPowerShellRoutingTroubleshooting

Symptom

A stale host route diverts one server through an offline VPN. Find the exact prefix and remove only that route.

Your mission

Inspect, recover, then verify

Format

Windows PowerShell

PowerShell: Inspect and Remove a Bad Route

Investigate before you configure.

Use the CLI evidence to isolate the fault, make the smallest safe correction, then verify the network state changed.

Observe the symptom and link state.

Diagnose by comparing the protocol evidence.

Verify the expected device state and confirm the original symptom is resolved.

Console access: PowerShell

This workspace stacks for portrait phones. Rotate to landscape for the full split-screen console.

Need a hint?

Reveal the root cause when you're ready.

Try the investigation first, then use this as your escape hatch, not a dead end.

Locked

Sign up with your email to open PowerShell: Inspect and Remove a Bad Route, free. You get the root cause and the full step-by-step fix.

No spam. The fix lands in your inbox too. Signing up includes 4 guided labs free, tracked against your email. After that, the Learning Pass unlocks every remaining lab.

Lab debrief

Turn the session into a repeatable troubleshooting pattern.

Use this reference after your attempt: first explain the symptom, then verify the evidence, then confirm the repair.

The problem

Everything works except 203.0.113.20. A persistent /32 route sends that address to offline next hop 10.99.0.1.

What you'll practice

  • Read destination prefixes, next hops, and metrics
  • Filter Get-NetRoute by exact prefix
  • Remove a specifically scoped route
  • Avoid unfiltered Remove-NetRoute

The topology

A Windows workstation has a valid Ethernet default route and one stale host route left by a VPN client.

Commands to run yourself

The real diagnostic commands for this lab, copy-paste ready. Run these in the same order to reproduce the investigation on your own session.

List IPv4 routes
Get-NetRoute -AddressFamily IPv4
Inspect the host route
Get-NetRoute -DestinationPrefix 203.0.113.20/32

Topology diagram

Fact-checked references

The commands and behaviour in this lab were checked against these primary references.

Frequently asked

Why does the /32 beat the default route?

Route selection prefers the longest matching prefix first. Metric breaks ties among otherwise comparable routes; it does not make a default route beat a matching host route.

Why include -NextHop when removing it?

It narrows the target and makes the intended deletion explicit.

Ready to run this lab yourself?

No setup, no image sourcing. Book a session or ask for a live demo.