Questions tagged [netsh]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
34 views

Set Windows Firwall to block all outbound but allow DHCP and web use

I am trying to set Windows firewall to block default public profile, but am having difficulty when outbound activity is set to block by default, despite including allow rules for DHCP and DNS. Failure ...
Sbolt_'s user avatar
  • 11
0 votes
1 answer
57 views

Create Hotspot Without WPA or Password

Setting up a network for my area to provide free WIFI, but there doesn't seem to be a way to create a hotspot without WPA2 even using the netsh commands with empty password like I see repeated 1000 ...
Kyle's user avatar
  • 1
0 votes
1 answer
47 views

Backup & Restore Winsock?

In the process of doing some troubleshooting and running the netsh winsock reset command, and was wondering if anyone is aware of a way (or app) to backup the current winsock catalog (and/or ...
J. Scott Elblein's user avatar
0 votes
1 answer
177 views

Blocking an ip with netsh

I know that netsh advfirewall firewall add rule name="name" dir=out remoteip=%IP% protocol=TCP action=block blocks the IP, and we can find the IP by simply pinging it. I used to use it to ...
steatoda's user avatar
1 vote
0 answers
72 views

Can't remove port from excludedportrange

I cannot remove port 80 from excludedportrange. Here's the complete list of exclusions (run in elevated cmd): C:\Users\CptBartender>netsh int ipv4 show excludedportrange protocol=tcp Protocol tcp ...
CptBartender's user avatar
0 votes
0 answers
15 views

Facing an issue after running “netsh wlan show profiles” command [duplicate]

I want to retrieve password of an old WiFi connection but when I run `netsh wlan show profile command it shows: what should I do?
Muhammad Habibi's user avatar
1 vote
1 answer
107 views

How can I escape single quotes in cmd parameter?

I wanted to display a network profile in cmd using netsh, with netsh wlan show profile name="JohnDoe's iPhone". This WiFi name has an apostrophe in it, as you can see. The command responds ...
edddd's user avatar
  • 189
0 votes
0 answers
29 views

Windows Event to signal removed network adapters

I am looking for a way to programmatically recognize when a network adapter under windows is removed. In particular, I want to get noticed when a network adapter disappears from Control Panel\Network ...
Michel's user avatar
  • 107
0 votes
0 answers
31 views

Persist virtual network after reboot in Windows

I'm not sure in the terms, but I create "virtual" network in Windows by running netsh interface ip add address "vEthernet (WSL)" 192.168.99.1 255.255.255.0 command. It does all I ...
Dmitrij Kultasev's user avatar
0 votes
1 answer
341 views

How do I create and setup a network interface for Windows 10 on a VPS?

I've installed Windows 10 on a VPS machine. Now I'm connected to the virtual terminal to access RDP and it says no internet connection. I've opened terminal and now looking at the interfaces so far, ...
User's user avatar
  • 821
0 votes
1 answer
987 views

Create batch to add firewall rules

Is there anyway to create a batch to run the following codes ? I made the batch file but not able to get the job done. :Allow IPV4 Ping netsh advfirewall firewall add rule name="ICMP ...
VB88's user avatar
  • 321
1 vote
2 answers
693 views

Connect if disconnected and disconnect if connected with batch [duplicate]

I'm trying to do a one-line batch command (for use with autohotkey with a keybaord shortcut) to: disconnect Wifi if it is connected: netsh wlan disconnect connect to SSID="MyWifi" if Wifi ...
Basj's user avatar
  • 1,554
0 votes
0 answers
2k views

netsh fails to set MTU

I'm trying to set the MTU for a Mellanox 100Gb NIC using netsh. The command works for small MTU values, but it fails for anything larger than 2000. The card is a ConnectX-6 and I know it supports ...
Elliott B's user avatar
  • 1,083
0 votes
1 answer
123 views

Network changes lost on quick hard reboot

On Windows 10, if I change the IP address and perform a hard reboot a few seconds later (cut the power and restart after some momemts) the change does not persist, i.e. the IP address is back to what ...
Michel's user avatar
  • 107
1 vote
1 answer
295 views

DOS batch file to display netsh channel output

I'm trying to get wifi Channel output from netsh command to be 2.4GHz or 5GHz The following provides me with Channel output: netsh wlan show interface name=Wi-Fi | findstr "Channel" Output ...
mnauta's user avatar
  • 11
0 votes
1 answer
1k views

Netsh wlan show profile name=NetworkName key= clear does not show WiFi Password

When I run Netsh wlan show profile name=NetworkName key=clear for some of the wifi networks listed with netshw wlan show profiles from an Admin command prompt the Security section shows Security Key ...
SimonKravis's user avatar
0 votes
0 answers
386 views

Windows terminal open on startup with proxy error

Every time I start my computer (Windows 11) windows terminal opened in C:\WINDOWS\system32\netsh.exe pops up with an error: Error writing proxy settings. (5) Access is denied. Current WinHTTP proxy ...
spec's user avatar
  • 1
0 votes
1 answer
1k views

Getting 169.254.31.218 IP address / can't ipconfig /release to change IP address

I can't figure this out and it's become a nightmare. A computer on our network has no internet. If I plug the problem computer in on another network the internet works. No other computers on the ...
manchakowski's user avatar
3 votes
1 answer
1k views

Windows Terminal opens on startup with proxy error

Note: This is a duplicate of When I Start my Windows 11 computer, the terminal pops up saying: Error writing proxy settings. (5) Access is denied which has no clear solution for this problem, as it ...
ATYB's user avatar
  • 147
1 vote
1 answer
131 views

Can't get ip address with wmic command for PPPoP interface

I have tried to get ipv4 address of one of adapters, precisely from "PPPoP WAN Adapter" when it is connected, using wmic nic and wmic nicconfig commands but it didn't work. In general, when ...
KrzysztofJ's user avatar
0 votes
0 answers
122 views

Enable remote desktop in Windows 8

I am trying to enable Remote Desktop in my old Windows 8 laptop. I did not find a way to do it via GUI, as I do not have the settings shown everywhere (1, 2, etc.) This is what I have The second ...
sancho.s ReinstateMonicaCellio's user avatar
1 vote
2 answers
1k views

Access server hosted on 127.0.0.1 within Guest OS from the Host OS in VirtualBox

I have a ColdFusion server that launches on 127.0.0.1:WXYZ within a virtual machine on VirtualBox. I need to be able to access the server from my Host OS. I have tried using a Bridged adapter as well ...
Michael Pulis's user avatar
0 votes
0 answers
520 views

netsh.exe keeps popping on Windows 10

I am using Windows 10. The netsh.exe popup saying "The object already exists" shown in this image: It keeps popping up from time to time. It pops up and goes away. While I am working or ...
M. Usman Khan's user avatar
0 votes
0 answers
112 views

Windows 10: How to add Network Command Shell (netsh) to Firewall whitelist?

I use the netsh interface portproxy command to proxy connection into my VM. However, Windows Firewall blocks the connection. I know I can use the netsh advfirewall command to poke a hole. But I would ...
some user's user avatar
  • 2,335
1 vote
2 answers
243 views

PowerShell Script That Toggles Network Connection

I want to write a Powershell script that acts as a toggle for a connection to the internet each time it is run. I wrote this, which works: $isconnected = netsh wlan show interfaces | select-string ...
jippyjoe4's user avatar
  • 1,208
1 vote
1 answer
158 views

Reset network settings

In Windows, I ran the command netsh interface ipv4 set address name="Wi-Fi" static 192.168.3.8 255.255.255.0 192.168.3.1. I didn't really know what I was doing and now my Internet is not ...
YJiqdAdwTifMxGR's user avatar
2 votes
2 answers
187 views

Combining batch files so double click performs one operation and the next double click reverses or performs the next operation?

So I have two separate batch files. One to disable the NIC and enable the wifi card: @netsh interface set interface name="Ethernet" admin=disabled @netsh interface set interface name="...
darien.day's user avatar
0 votes
0 answers
227 views

Windows 10 no internet access with 4G dongle & LAN

I have the following setup on a remote computer: Ethernet connection: only for local network - no internet access 4G dongle: internet access When combining the two, I don't have internet access. ...
wouter205's user avatar
  • 101
1 vote
1 answer
317 views

How to add multiple IPv6 addresses to an interface in Windows?

I can add addresses to an interface using netsh interface ipv6 add address SomeInterface SomeIPv6Address Can I somehow add a range of ipv6 addresses e.g. 2001:db8:0000:0000:0000:0000:0000:0001 to ...
Hexception's user avatar
0 votes
1 answer
977 views

Local port forwarding - macOs Big Sur

I need to forward all traffic going to 127.0.0.1:5432 to 192.168.1.103:543 on macOS Big Sur. Similar command on Windows is netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=5432 ...
JaSHin's user avatar
  • 101
0 votes
2 answers
308 views

Understanding IP address assignment and routing of hosted network

The hosted network ("Wifi tethering" or "wireless access point") can be enabled with: netsh wlan set hostednetwork mode=allow ssid=[name] key=[password] netsh wlan start ...
divB's user avatar
  • 565
1 vote
2 answers
616 views

netsh advfirewall command was not found

I have an advanced rule setup in Windows firewall that I want to be able to turn on and off via an AutoHotkey script. RunWaitOne(command) { shell := ComObjCreate("WScript.Shell") ...
Stegathesaurus's user avatar
8 votes
1 answer
4k views

Find who excluded port range

When trying to start docker container, the following errors is shown: Cannot start service <service>: Ports are not available: listen tcp 0.0.0.0:5601: bind: An attempt was made to access a ...
cdalxndr's user avatar
  • 180
1 vote
1 answer
5k views

What is the exact equivalent of this netsh Windows command for MAC? The command is attached in the body

I want to block all networks from my PC with admin access and make it so that the user cannot reverse the changes. I will use admin access to only white list certain networks that will be visible to ...
Muhammad Huzaifa's user avatar
0 votes
0 answers
22 views

How to set different TTLHOP for TCP ports

We want to set sensitive TCP/UDP Ports at low TTL/HOP Leaving other ttl/hop at 128 default data center = 3 Priv net = 8 Internet = 128 default Ssh 22 = 8 (internal hop max) Rdp 3389 = 8 Http 80 = 128 (...
Bill Alderson's user avatar
3 votes
1 answer
97 views

Performing network connection "diagnose" / "troubleshoot" via command line in Windows

Is there a way in command line to do the steps that Windows 10 does when you right click a network connection and choose "diagnose" or when you tell it to troubleshoot a connection? I'm ...
g491's user avatar
  • 444
26 votes
9 answers
80k views

Make IP address of WSL2 static

I am running an SSH server within WSL2 on a WIN10 machine. To make that work I am using: netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=22 connectaddress=172.19.237.178 ...
Nick's user avatar
  • 1,143
0 votes
1 answer
1k views

netsh advfirewall can not set group profile

Windows Server 2008 R2 Standard, 64 bit. Powershell version 5.1.144049. Trying to use a command from this Microsoft Support Page -> Example 8: Enable specific services netsh advfirewall firewall ...
Bender Bending's user avatar
1 vote
1 answer
3k views

Change metric of a disconnected interface with netsh

I am creating a Wapt_package to deploy VPN Interface on our user's terminal. I create the VPN interface without issue, but we need to set the metric of the vpn interface to 1. add-VPNConnetionRoute -...
LMS's user avatar
  • 11
0 votes
0 answers
730 views

Slow Internet Speed Windows 10 NETSH WINSOCK fixes it

So I have stumbled upon an extremely annoying task I have to do everyday and that is to run netsh winsock reset catalog everytime I boot into Windows. I have no idea why this has come about but its ...
Dr Schizo's user avatar
  • 101
0 votes
1 answer
66 views

What does the parameter -c for netsh actually do?

The Microsoft Doc says "-c Optional. Specifies that netsh enters the specified netsh context." I don't understand what the context means here. Could anyone explain this parameter for me? I would ...
microbit's user avatar
2 votes
1 answer
243 views

Internet Connection Sharing + Port Forwarding range

I'm using Internet Connection Sharing from a Windows 10 computer in order to give a device internet connection and would like to use port forwarding from this connection as well but I need to add a ...
John Doe's user avatar
0 votes
1 answer
1k views

How to route tcp traffic from all/range of ports to a single port?

I would like to do something that's possible with IPTABLES(for linux), on a Windows 10 - that is to route multiple ports to a single port. I thought I'd manage to do it with netsh, but it doesn't ...
toti's user avatar
  • 121
1 vote
1 answer
58 views

How to connect/disconnect a network not found by netsh?

I use a network which can be found with ipconfig but cannot with netsh wlan show networks or netsh wlan show interfaces. I assume this may not be a wlan network but something else. I know it's ...
Peter.k's user avatar
  • 129
1 vote
1 answer
868 views

Exclude route from netsh interface

My setup is as follows: Windows 10, Corona forced home office, I'm an external contractor at a huge company I'm connecting to the VPN of my company, called MyVPN, some internal IPs of our client are ...
Reeno's user avatar
  • 137
1 vote
1 answer
392 views

How to show keys in netsh without mentioning the name parameter

Queria saber se no netsh show profiles key=clear,ao invés de colocar o ssid de cada rede para ver o "Conteúdo da chave", poderia mostrar de uma forma geral. Já tentei usar o "*" no name,mas não deu ...
Sr. Azul's user avatar
3 votes
0 answers
670 views

How to clear the state of Windows filtering platform?

To troubleshoot firewall I use: netsh wfp show state this generates xml file for all the dropped packets and firewall state. the problem is that this file is 13 MB, and it keeps growing each time I ...
metablaster's user avatar
1 vote
1 answer
880 views

A Windows 10 service is using ports 80 and 443. How can I change them?

I want to use ports 80 and 443 for Apache server but they are reserved for a windows service as shown by netsh http show urlacl see output here Firewall inbound rules show that BranchCache Hosted ...
Drk's user avatar
  • 111
0 votes
2 answers
453 views

How to create a scheduled task that blocks access to the Internet but not to the local network?

I need your help. I should to create a scheduled task that blocks access to the Internet but I must have access to the local network. Also this task should work on weekdays from 8:00am to 5:00pm.
Dima Voroshen's user avatar
0 votes
1 answer
4k views

finding the reason for being disconnected from wifi network

I am behind a firewall known as Sophos. I use Windows 10. I am facing some challenges in my Windows 10 I am getting frequently disconnected from my wifi . .There are power outages in my network but ...
political science's user avatar

1
2 3 4 5