Questions tagged [netsh]

In software, netsh, or network shell, is a utility included in Microsoft's Windows NT line of operating systems beginning with Windows 2000. It allows local or remote configuration of network devices.

Filter by
Sorted by
Tagged with
3 votes
0 answers
651 views

Windows MTU can no longer be set higher than 1500 Bytes?

For some time we have been using jumbo frames on several computers without problems. But suddenly I am no longer able to increase the MTU on some computers to more than 1500 Bytes. netsh returns error ...
user avatar
0 votes
0 answers
48 views

windows static routes location when created using netsh

On older windows systems persistent routes that were created with "route add" seems like this location is where they are stored in the registry. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\...
user avatar
  • 101
0 votes
2 answers
771 views

Port proxying with netsh

I am working on windows machine and using netsh portproxy to forward traffic from port 4000 to application running on port 4002. It works fine when trying to access my application from localhost or ...
user avatar
0 votes
1 answer
236 views

Windows 10 remote tools not working, mmc, psexec etc

I'm having a problems on the network Some newer Windows 10 PC's (Win10 image from Dell), behave different, then older Dell PC's. They have the same service pack's and hotfixes, its something in ...
user avatar
  • 115
1 vote
0 answers
2k views

Accessing WSL2 From Public IP Address

I have installed WSL2 with Ubuntu 20.04 on Windows 10. I have an Apache server running in WSL2, and this works fine when I use a browser in Windows (Chrome) to access it via WSL IP address. As the ...
user avatar
  • 13
1 vote
0 answers
149 views

Using 'netsh interface ip set address' to override another adapter's address?

I'm one of the developers of the OpenConnect VPN client. We're trying to modernize and improve our support for Windows. We use a user-customizable JScript called vpnc-script-win.js to configure IPv4/...
user avatar
0 votes
1 answer
222 views

Simulate network reset or failure in Windows

I have to check if my server application can recover from transient network failures. The application listens on some ports and is a client to backend services. I would like to run some command or ...
user avatar
  • 171
1 vote
1 answer
465 views

Get-NetIPInterface property 'Dhcp' is 'Enabled' after setting static IP configuration with netsh

The Question Set a static IP configuration with netsh: netsh interface ipv4 set address name="Ethernet1" static 192.168.0.20 255.255.255.0 192.168.0.1 netsh interface ipv4 set dns name="...
user avatar
  • 111
2 votes
0 answers
477 views

How to delete IPv6 DNS Servers via command line?

I can successfully delete IPv4 DNS Servers via command line on a Windows Server 2019 with the following command: netsh interface ipv4 delete dnsserver "My Ethernet" all After this command I ...
user avatar
10 votes
1 answer
1k views

How do I dump raw data from a TCP port in Windows using the netsh command?

I have an apparently simple issue which is proving very difficult to find an answer for. The site has a highly-secured Windows Server 2019 installation and an appliance connected to it running on a ...
user avatar
  • 243
0 votes
0 answers
229 views

Netsh command not found on Azure server

I have a Microsoft Azure server and I need the netsh command, but netsh.exe is not where I would expect it. I've tried creaing an Administrator powershell session, and an administrator CMD session. I ...
user avatar
  • 121
1 vote
0 answers
575 views

Proper way to configure Windows 10 firewall for multiple users

We are deploying a Windows 10 LTSC image to multiple devices. The image configures one admin user and a second non-admin user. The non-admin user is the primary account for day-to-day use of the ...
user avatar
-1 votes
2 answers
691 views

windows 10 firewall: block any ip address but one

i have just enabled remote desktop on a windows 10 computer, and in fact when i telnet to 3389 port from any other computer i can reach that service, but what i want is to deny the connection from any ...
user avatar
3 votes
2 answers
5k views

Use netsh to show enabled firewall rules only

I'm using the following command to list firewall rules netsh advfirewall firewall show rule dir=in name=all How can I display enabled rules only? There's no switch like enabled=true
user avatar
  • 717
0 votes
1 answer
402 views

Using netsh or netstat (or other native tool) to display UDP traffic to Windows server from given host

We have a Windows server that we suspect is not receiving UDP traffic from a Linux server. We've been able to establish, using tcpdump, that the Linux server is sending UDP traffic and we would like ...
user avatar
  • 101
2 votes
1 answer
3k views

How to disable IPv6 dhcpstaticipcoexistence on Server 2019

I have a Server 2019 host that has a static IPv6 address. It seems Microsoft added a feature in Windows 10 that is also present in 2019 where a host can have both a static IP address, as well as a ...
user avatar
  • 5,277
1 vote
0 answers
258 views

Outbound NAT on Windows

I am starting to admin Windows server and have some troubles with network tools. I am trying to configure nat on Windows Server 2012. My Windows VM has two networks adapters, the first one connected ...
user avatar
1 vote
0 answers
1k views

When is "netsh.exe http update sslcert" available?

On some PC's running netsh.exe http update help shows the command netsh.exe http update sslcert and it works, but on other PC's it does not. (Both running Windows 10.) When was it introduced / removed?...
user avatar
  • 171
1 vote
1 answer
1k views

How to enable folder sharing using netsh?

I'm trying to enable folder sharing for all. netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes Seems to work for File and Printer but netsh advfirewall firewall ...
user avatar
  • 11
1 vote
1 answer
184 views

How to change network adapter DNS servers on Windows without using netsh or WIM

I would like to modify network adapter DNS servers on Windows programmatically. I don't want to use WMI, because it fails for instance when no network cable is connected to the ethernet adapter being ...
user avatar
0 votes
2 answers
912 views

SMB on a NIC with multiple IP in same subnet

I have a Windows 2008 R2 server and set multiple IPs(same subnet) on a NIC. Now SMB service is binding on the lowest IP address as port 139, 455 are opened on it. My question is, can I bind SMB to ...
user avatar
1 vote
2 answers
3k views

NETSH - how to bind SSL Certificate to port and pass traffic to application?

On Windows Server 2016 I have a simple python web server (in flask). It works great, and listens on port 80 (or whatever I configure it to listen on). I need to serve it over SSL. I have a good ...
user avatar
1 vote
0 answers
817 views

Dhcp server on windows 2008r2 gives this error: "unable to determine the dhcp server version"

Hi i have two dhcp server on my lan and each of them is running on a dc (windows 2008r2). i'd like to manage both of the dhcp server from the command line with the netsh command by domain\...
user avatar
1 vote
0 answers
292 views

How to clear program/service from Windows firewall rule with netsh

I want to use netsh.exe to modify an existing Windows firewall rule, to remove the "Programs" and "Services" part of the rule. In other words, I want to set it to "All programs that meet the specified ...
user avatar
  • 141
1 vote
0 answers
112 views

Wireless Hosted Network client isolation

I would like to know if there is an option to enable/disable client isolation when using the Wireless Hosted Network feature, present in most windows 7 laptops with a capable wireless adapter, and ...
user avatar
0 votes
0 answers
172 views

No Effect Registering SSL Certificate for HTTP port on a Windows Server

I have this Windows Server 2016 where a windows third-party Windows service is listening to a specific port that is in turn associated with a specific SSL certificate. At first, the SSL certificate ...
user avatar
1 vote
1 answer
2k views

Set Remote Computer To DHCP Enabled Without Using WinRM

How can I set a remote computer to use DHCP instead of a static IP address? I have tried using Set-NetIPInterface -DHCP Enabled however this requires WinRM which is disabled on my network. How can I ...
user avatar
1 vote
0 answers
433 views

IIS stops listening

I have a Windows server that periodically stops responding to requests on a particular IP address. I can find no reason/cause, but I'll confess right off the bat that I'm not a sys/network admin. The ...
user avatar
1 vote
0 answers
63 views

netsh dhcp differs from mmc dhcp

While building an automated script for counting the amount of Wi-Fi users I encountered the following problem on our W2k8r2-server: Netsh dhcp server scope 192.168.1.0 show clients No of clients: 13 ...
user avatar
  • 244
1 vote
1 answer
12k views

blocking ip address with netsh filter

i am trying to block ip address on my machine by doing the following in cmd netsh ipsec add policy name=IPSystem netsh ipsec static add filter filterlist=BlackList srcaddr=74.356.69.108 dstaddr=me&...
user avatar
1 vote
0 answers
343 views

Disabling ECN: Netsh: incorrect paramater when executing via SaltStack cmd.run

I'm attempting to mass disable Explicit Network Congestion Notification on a group of Windows Server 2012r2 servers hosted in AWS EC2. I'm using the Salt Stack configuration management tool. When I ...
user avatar
  • 205
3 votes
1 answer
2k views

netsh dhcp binding command not working on Server 2016?

I have kind of a weird issue. I'm migrating Server 2008 R2 to Server 2016. We have a DHCP Server role which services two scopes. When setting them up, a line runs: netsh dhcp server \\computername ...
user avatar
  • 319
1 vote
1 answer
1k views

Two Option ID 51 in DHCP

I'm using this command: netsh dhcp server \\serverName 10.11.12.3 show optionvalue and am getting back two values for option 51: Changed the current scope context to 10.11.12.3 scope. Options for ...
user avatar
0 votes
0 answers
2k views

Set Multiple IP Addresses For DHCP Option 6 DNS Server Using Netsh

I am trying to set two IP addresses for option 6 DNS server using this code: $serverIpAddress = '11.12.13.14' $subnet = '11.12.43.33' $value = '11.12.74.21,11.12.74.22' netsh dhcp Server $...
user avatar
3 votes
2 answers
4k views

Prevent IIS Listing on Port 443 for Single IP Address

I am running a website in IIS and am also running another piece of software which streams media over port 1935 on the same server. The streaming software also has the capability of delivering content ...
user avatar
  • 412
0 votes
1 answer
189 views

Set the default interface for routing / traffic

I have a Windows 2008 R2 (or newer, doesn't matter) server with IP 192.168.68.14/24 on interface "Ethernet0" / index 12. When adding the IP address 192.168.68.222/24 the interface 192.168.68.14 is ...
user avatar
  • 125
0 votes
1 answer
1k views

Windows Server 2012 | Cannot connect | Network settings need to be reset

I currently rent out a Windows Server 2012 dedicated server off shore. I was trying to configure an additional IP address for my server so i was went to network sharing and adapter settings. From ...
user avatar
  • 1
1 vote
1 answer
157 views

Making secondary Ip addres primary, without disrupting internet connectivity

I'm adding a secondary IP address with this command: netsh interface ipv4 add address "Ethernet" NewIp 255.255.255.0 After that, I want to make this address primary (default), without disrupting ...
user avatar
1 vote
1 answer
2k views

Multiple IP Addresses from DHCP

I have a problem with multiple processes needing to bind a TCP socket to the same port in Windows Server 2008. At the moment I believe this is causing some unexpected erratic behavior as a race ...
user avatar
  • 587
3 votes
0 answers
350 views

Win7, add route with netsh without mentioning interface

I want to make a script for my team to add routes, but as each computer has its own set of interfaces so I can't know interface name/ID in advance. Is it possible to do with netsh(I know how to do it ...
user avatar
  • 31
0 votes
2 answers
3k views

How to refresh netsh wlan show interface (while doing a wifi survey of the room)?

I like using the command netsh wlan show interface to quickly get info on my wifi connection. Does anyone know how I could have the output refresh every second? This would allow me to do a quick wifi ...
user avatar
3 votes
2 answers
5k views

How to use Windows netsh firewall command to allow only specific ipaddress on all port and deny all other ipaddress?

I require a configuration of firewall which will allow me connection through only specific ip-address say 10.0.0.1 on all port ranging from 0-5555 and deny all other ip-addresses? What will be the ...
user avatar
  • 131
2 votes
0 answers
3k views

How to redirect IP address to another IP address using netsh windows tool?

My question is : how to redirect IP address to another IP address ex: 10.10.10.10 -> 20.20.20.20 (these IP are external) This answer shows me how to map IP adress to localhost. Can I redirect/route ...
user avatar
  • 797
10 votes
1 answer
42k views

Can I redirect/route IP adress to another IP address (windows) [closed]

Can I map 146.112.61.106 IP address to my 127.0.0.1 adress ? so when I type 146.112.61.106 I got redirected to 127.0.0.1 ? (some netsh command maybe ?)
user avatar
  • 797
1 vote
0 answers
144 views

IPsec Security Associations prevail even after IPsec tunnel is down

I am working on a script that can detect if existing IPsec tunnels on a system have gone down. From my observations, I have seen that it can take any where between 1 second to 8 minutes for this to be ...
user avatar
  • 333
0 votes
2 answers
3k views

netsh command to add interface

I am working with Windows 2012 R2 Core and I having problems with setting up my NICs after they got reset. When I run "netsh int show int" it shows bother Interfaces as Enabled and Connected. ...
user avatar
  • 151
4 votes
1 answer
5k views

Disable DHCPv6 client in Windows

I don't quite understand the link between 4 parameters related to IPv6 stateful and stateless autoconfiguration used under netsh int ipv6 set interface command context in Windows: advertise ...
user avatar
  • 260
0 votes
0 answers
153 views

DHCP export using netsh

I'm trying to export a DHCP database using the following command: netsh dhcp server export c:\dhcpdb.dat all However it completes with the error WARNING: Could not obtain host information from ...
user avatar
  • 11
5 votes
2 answers
2k views

Deallocated Azure VM Loses IPv4 DNS Address

I deallocate my development Azure VMs every night to conserve my credits. My VMs are all on one vnet using a domain controller. Since it is on the subnet, the domain controllers address never changes. ...
user avatar
0 votes
1 answer
855 views

Work Folders / IIS - Using Wrong Certificate - Ignoring Bindings

I can't seem to get Work Folders to serve using the correct certificate. I've bound it via netsh to a wild card certificate, and when I check "netsh http show sslcert" every binding uses the correct ...
user avatar