Netsh

netsh (network shell) ist eine Konsolenanwendung für Betriebssysteme aus der Windows-NT-Familie, das das Konfigurieren von lokalen und entfernten Netzwerkeinstellungen ermöglicht.[1]

Eine häufige Einsatzmöglichkeit von netsh ist das Zurücksetzen des TCP/IP-Stacks, was unter Windows 98 noch einer Neuinstallation des TCP/IP-Adapters bedurfte.

Netsh hat noch viele weitere Funktionen, so kann beispielsweise die IP-Konfiguration geändert werden.

Beispielanwendung

Anzeigen des Passwortes einer SSID:

netsh wlan show profile (wlan name) key=clear

Zurücksetzen des TCP/IP-Stacks:

netsh interface ip reset C:\resetlog.txt

Verfügbare Schnittstellen anzeigen:

netsh interface show interface

Feste IP-Adresse setzen:

netsh interface ip set address "Local Area Connection" static 123.123.123.123 255.255.255.0

Feste IP-Adresse und Gateway setzen:

netsh interface ip set address "Local Area Connection" static 123.123.123.123 255.255.255.0 123.123.123.1 1

Zwei feste IP-Adressen setzen:

netsh interface ip set address "Local Area Connection" static 123.123.123.123 255.255.255.0
netsh interface ip add address "Local Area Connection" 234.234.234.234 255.255.255.0

Dynamische IP-Adresse:

netsh interface ip set address name="Local Area Connection" source=dhcp

Nameserver setzen:

netsh interface ip set dns name="Local Area Connection" source=static address=123.123.123.1

Im Internet Explorer eingetragenen Proxy systemweit nutzen:

netsh winhttp import proxy source=ie

netsh und IPv6

Mit netsh können ebenfalls IPv6-Informationen aus dem Stack gelesen werden, und es ist benutzerfreundlicher als IPv6.exe, welches dieselben Informationen zur Verfügung stellt.

Die IPv6-Adresse mit netsh anzeigen:

netsh interface ipv6 show address

netsh und DHCP-Server

Mit netsh kann man DHCP-Server speichern und wiederherstellen.

Alle DHCP Informationen sichern

netsh dhcp server \\server1 export c:\sicherung\dhcp all

Alle DHCP Informationen wiederherstellen

netsh dhcp server \\server1 import c:\sicherung\dhcp all

DHCP Informationen dumpen

netsh dhcp server \\server1 dump > c:\sicherung\dhcp_backup.txt

Einzelnachweise

  1. Jason Gerend et al.: Network Shell (netsh). In: learn.microsoft.com. Microsoft, 26. Januar 2023, abgerufen am 12. August 2024 (englisch).

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.