As of May 31, 2023, we have updated our Code of Conduct.

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
0 votes
0 answers
11 views

How to register identical WCF endpoints under different Subdomains?

How do I have two services offer identical WCF endpoints under different subdomains? I have two Services, each trying offering WCF Endpoints to consumers in my network: Service 1: https://subdomain1....
Verzweifler's user avatar
-1 votes
1 answer
144 views

Remotely open PowerShell via Intune/365?

The organisation I work for have a range of different devices, mainly laptops, Surface Go and Surface Pro. We have a number of devices that we need to physically locate at our sites for servicing and ...
rgmnz's user avatar
  • 11
0 votes
0 answers
147 views

Debugging netsh portproxy tls client hello tcp connection reset

On a Windows 2016 Server (1607) we're currently facing quite strange TCP Connection Reset issues on TLS1.2 Client Hello on a port with port-proxy (netsh interface portproxy add v4tov4 ...); sometimes ...
ciis0's user avatar
  • 101
0 votes
0 answers
30 views

Good/proper way to configure/deploy computer wi-fi? Is netsh evil?

I used netsh interface ip ... to configure a computer and that caused me a lot of grief, and wonder if there is a "better" way. I occasionally need to configure new MS Surface computer/...
El Ronaldo's user avatar
4 votes
0 answers
4k 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 ...
Timmy Brolin's user avatar
0 votes
2 answers
2k 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 ...
user5249875's user avatar
0 votes
1 answer
483 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 ...
Peter's 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 ...
Bob's user avatar
  • 13
2 votes
0 answers
409 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/...
Dan Lenski's user avatar
0 votes
1 answer
490 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 ...
fernacolo's user avatar
  • 169
1 vote
1 answer
2k 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="...
Silv's user avatar
  • 111
2 votes
0 answers
859 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 ...
g.pickardou's user avatar
10 votes
1 answer
2k 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 ...
Ruslan's user avatar
  • 243
0 votes
0 answers
306 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 ...
TMorgan's user avatar
  • 121
1 vote
0 answers
910 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 ...
taithwork's user avatar
-1 votes
3 answers
1k 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 ...
user3227400's user avatar
3 votes
2 answers
7k 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
daisy's user avatar
  • 747
0 votes
1 answer
709 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 ...
Olumide's 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 ...
fukawi2's user avatar
  • 5,386
1 vote
0 answers
345 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 ...
Benjamin ANDRE's 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?...
Peter's user avatar
  • 171
1 vote
1 answer
2k 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 ...
FoxyZ's user avatar
  • 11
1 vote
1 answer
238 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 ...
Mariusz Schimke's user avatar
0 votes
2 answers
1k 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 ...
Leo Chiu's user avatar
1 vote
2 answers
4k 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 ...
Jonesome Reinstate Monica's user avatar
1 vote
0 answers
876 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\...
D'Arcy Nader's user avatar
1 vote
0 answers
344 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 ...
richb's user avatar
  • 141
1 vote
0 answers
114 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 ...
user2464424's user avatar
0 votes
0 answers
223 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 ...
Oskar Lindberg's user avatar
1 vote
1 answer
3k 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 ...
David Klempfner's user avatar
1 vote
0 answers
463 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 ...
James Hill's user avatar
1 vote
0 answers
65 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 ...
MKZ's user avatar
  • 261
1 vote
1 answer
14k 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&...
madam mar's user avatar
1 vote
0 answers
370 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 ...
Mr.Budris's user avatar
  • 215
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 ...
prelic's user avatar
  • 319
1 vote
1 answer
2k 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 ...
David Klempfner's 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 $...
David Klempfner's user avatar
3 votes
2 answers
5k views

Prevent IIS listening 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 ...
5lovak's user avatar
  • 432
0 votes
1 answer
237 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 ...
StefanK's 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 ...
Jimmy's user avatar
  • 1
1 vote
1 answer
220 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 ...
F Andrei's user avatar
1 vote
1 answer
3k 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 ...
Luke's user avatar
  • 557
3 votes
0 answers
442 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 ...
Alex C's 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 ...
Steve Tremblay's user avatar
3 votes
2 answers
6k 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 ...
snoop's user avatar
  • 131
2 votes
0 answers
4k 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 ...
yarek's user avatar
  • 827
11 votes
1 answer
48k 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 ?)
yarek's user avatar
  • 827
1 vote
0 answers
160 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 ...
ngn's user avatar
  • 333
3 votes
3 answers
4k 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. ...
Chris's user avatar
  • 181
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 ...
Chris's user avatar
  • 260