0

I'm a Unix guy and I need help writing a script on Windows 10 that will do the following.

  1. sleep 60 seconds
  2. disable Ethernet1
  3. sleep 5 seconds
  4. enable Ethernet1

I don't know where to begin in Windows.

halfer
  • 19,824
  • 17
  • 99
  • 186
San Backups
  • 515
  • 9
  • 17
  • 3
    What have you tried? Have you looked at http://stackoverflow.com/questions/7469340/how-to-disable-or-reset-a-network-adapter-programmatically-in-c-sharp – zhon Aug 14 '16 at 20:07

1 Answers1

1

I figured it out.

timeout /t 60
netsh interface set interface "Ethernet0" DISABLED
timeout /t 5
netsh interface set interface "Ethernet0" ENABLED
timeout /t 60
halfer
  • 19,824
  • 17
  • 99
  • 186
San Backups
  • 515
  • 9
  • 17