Wednesday, November 16, 2011

How to Disable/Enable LAN through Command Prompt

This trick was first introduced to me by a friend  Kevin. This is just a simple trick but is really useful especially when you want to save time.This is for WINDOWS and will work only if you are in the user account with restrictions or with limited access to the system, meaning when you could not simply go to My Network Places and right click Local Area Network and Disable/Enable.

To do this, all you have to do is Go to Command Prompt and then type the following codes.

C:\> runas  /user:username "net stop DHCP"

Example if the administrator account is administrator

C:> runas /user:administrator "net stop DHCP"
then hit enter and it will prompt password for your administrator account.

When you want to enable it again, perhaps when you are done testing something. All you have to do is to replace "Stop" with "Start"

Example
C:>runas /user:administrator "net start DHCP".


This trick will surely save your time. When you are testing something, especially connectivity related trouble you can just use this instead of logging off and log in administrator account. Tested and working in xp and windows 7.

No comments:

Post a Comment