<p>OS: Vista enterprise</p>

<p>When i switch between my home and office network, i always face issues with getting connected to the network. Almost always I have to use the diagnostic service in 'Network and sharing center' and the problem gets solved when i use the reset network adapter option.</p>

<p>This takes a lot of time (3-4 min) and so i was trying to find either a command or a powershell script/cmdlet which i can use directly to reset the network adapter and save myself these 5 mins every time i have to switch between the networks. Any pointers?</p>

See this article from The Scripting Guys,
"How Can I Enable or Disable My Network Adapter?"
tl/dr:
```
```
Restart-NetAdapter   -Name "Your Name Here"
```
```
You can get the list using
```
```
Get-NetAdapter
```
```