Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 741 Vote(s) - 3.52 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Command/Powershell script to reset a network adapter

#11
You can also restart a NIC using wmic command:

Get interface ID:

C:\>wmic nic get name, index

Disable NIC (InterfaceID:1):

wmic path win32_networkadapter where index=1 call disable

Enable NIC (InterfaceID:1):

wmic path win32_networkadapter where index=1 call enable

Source: [

[To see links please register here]

][1]


[1]:

[To see links please register here]

Reply

#12
Thanks for the Info that it can be done with netsh.
I wrote a simple "Repair.bat" script:

@echo off
netsh interface set interface "%1" DISABLED
netsh interface set interface "%1" ENABLED

Just call it with the name of the NIC, renamed as i.e. "WLAN" so I does not have spaces, type "Repair WLAN" into cmd does the trick.
I'll place it into system32 and make a task of it or see how to integrate it into the network context menu...
Reply

#13
The following command worked for me (on Server 2012 R2):

Restart-NetAdapter -Name "Ethernet 2"
Replace "Ethernet 2" with the name of your adapter.

Note: To create a PS script: create a new document in Notepad, save is as `script.PS1`, insert the line above and save. Right click the file -> Run with PowerShell.

For more see this [technet][1] article.


[1]:

[To see links please register here]

Reply

#14
See this article from The Scripting Guys, ["How Can I Enable or Disable My Network Adapter?"][1]

tl/dr:

Restart-NetAdapter -Name "Your Name Here"

You can get the list using

Get-NetAdapter

[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through