C # to reset network adapter

I am looking for some pointers to where I am going to C # for a simple reset of a network device. My reason for being one of my mailboxes at work ceases to communicate with our Exchange servers after switching to standby mode, and if I could have a small application that resets the adapter with one click, that would be great.

+2
source share
2 answers

What do you mean by "reset"? do you mean that the adapter loses its address when it enters standby mode and does not receive it in the resume?

If so, then the easiest way to accomplish this would be to call ipconfig / renew.

this can be done using

System.Diagnostics.Process.Start("ipconfig", "/renew");

or just put on the desktop a batch file that you can double-click on the line

IPConfig /renew 

There.

EDIT ** , IPConfig/Release IPConfig/renew **

API Windows, , ipconfig/renew, .

ONESHOT

+4

" netsh DISABLED" " netsh ENABLED"

+2

All Articles