Skip to main content
18 votes
Accepted

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

Yes, you can do that with netsh: Run this command as admin: netsh trace start capture=yes tracefile=c:\temp\trace.etl then, stop the capture with netsh trace stop and grab the .etl file. Download ...
Swisstone's user avatar
  • 6,935
8 votes

What exactly does netsh int ip reset reset?

It is shorthand for: netsh int ip reset resetlog.txt netsh i i r r The last 'r' being the "log file" that you really don't care to read. What does it do? It hits your TCP/IP stack with a ...
jharrell's user avatar
  • 182
8 votes

netsh.exe: Error 87

netsh http add urlacl url=https://*:8081/ user=Everyone Also the trailing slash does matter -------------^
Alexandr's user avatar
  • 181
6 votes

How can I use netsh to find a rule using a pattern

On Windows 10 I get a warning when I execute netsh advfirewall, saying that future Windows versions may not support that feature anymore and one should use PowerShell instead. Luckily, what the OP ...
bcody's user avatar
  • 160
5 votes

What exactly does netsh int ip reset reset?

I can tell you from experience that it removes any static IP information for all the NICs on the machine. I tried it on a server that was acting up and had to re-enter all the IP/netmask/gateway ...
Aner's user avatar
  • 611
4 votes

netsh command to add interface

Everything has to be done in either CMD or Powershell. There is no GUI. You can use Windows Admin Center, a web-based GUI for Windows Server (Core). Sometimes it may be more convenient compared to ...
Net Runner's user avatar
  • 6,299
3 votes

How do I disable the firewall on a single interface in Windows 7?

There is an GUI option to disable a firewall on a specific NIC with Advanced Security, here is how to: go to CP --> System & Security ---> Windows Firewall --> advanced setting(left ...
Ahmed's user avatar
  • 31
3 votes
Accepted

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

NETSH is still what you want to do. You seem to have developed some kind of application, but altering the registry is sure not the way to go. Besides that - I highly recommend you use DHCP and ...
Florian Rossmark's user avatar
3 votes

Use netsh to show enabled firewall rules only

netsh advfirewall is not recommended anymore and might be deprecated in future versions of Windows (see the warning message when you enter netsh advfirewall). Additionally, I'm not aware of an "...
Swisstone's user avatar
  • 6,935
3 votes
Accepted

blocking ip address with netsh filter

The netsh ipsec and netsh firewall contexts are provided for backwards-compatibility with Windows 2000/XP/2003. Both were good for working remotely with older versions of Windows, and for configuring ...
Esa Jokinen's user avatar
  • 50.3k
3 votes
Accepted

netsh dhcp binding command not working on Server 2016?

Microsoft has been deprecating the NETSH cmd for years. I'm a little surprised to see that it is still present in Server 2016. Have you tried using the Powershell cmdLets? Set-DhcpServerv4Binding -...
Clayton's user avatar
  • 4,593
2 votes

How can I use netsh to find a rule using a pattern

Without PowerShell you can simply use regex with findstr: netsh advfirewall firewall show rule name=all | findstr /R "sql.*"
SDK's user avatar
  • 121
2 votes
Accepted

Two Option ID 51 in DHCP

I have to admit that I've never looked specifically at option 51 before but your question intrigued me so I did some testing. I think the answer is that you have BOOTP enabled with a lease duration ...
joeqwerty's user avatar
  • 111k
2 votes
Accepted

How to disable IPv6 dhcpstaticipcoexistence on Server 2019

Try test command from PowerShell Set-NetIPInterface -InterfaceIndex 3 -addressFamily IPv6 -dhcp Disabled
Spanner's user avatar
  • 36
2 votes

Use netsh to show enabled firewall rules only

I think this Powershell command might be useful in your case: netsh advfirewall firewall show rule dir=in name=all | Select-String -Pattern 'Yes' -Exclude "Edge traversal" -AllMatches -Context 2,11
Fsoc's user avatar
  • 83
1 vote
Accepted

Use Windows as a router

As suggested in the comments, the simplest solution is to use listenaddress=0.0.0.0 which does seem to make netsh portproxy more reliable. A better way to do it would be to use or develop a proxy ...
Maxime's user avatar
  • 21
1 vote

Remotely open PowerShell via Intune/365?

It appears I can simply use the Device Diagnostics in Endpoint Manager and look at wlan-report-latest.html to see the SSID and therefore locate the device the way I want to! What a waste of time ...
rgmnz's user avatar
  • 11
1 vote

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

By PowerShell on Windows for Ethernet (Check Valid Values): Get-NetAdapterAdvancedProperty | Where DisplayName -Like "Jumbo*" ` | Select DisplayName,DisplayValue,RegistryValue,...
Artyom Tsybulkin's user avatar
1 vote
Accepted

Port proxying with netsh

Apparently it wasn't working due to windows firewall, this solved it for me netsh advfirewall firewall add rule name="Open Port 4000" dir=in action=allow protocol=TCP localport=4000
user5249875's user avatar
1 vote

Windows 10 remote tools not working, mmc, psexec etc

It was indeed a firewall rule problem. And a problem in remote tooling, GLPI didnt work on some clients. netsh advfirewall firewall add rule name="RPC endpoint mapper" dir=in action=allow ...
Peter's user avatar
  • 115
1 vote
Accepted

Simulate network reset or failure in Windows

You could accomplish in multiple ways. Netsh Command - Dropping the Interface Use the "netsh interface show interface" command to get the name of the interface you wish to control. Run the ...
user7749674's user avatar
1 vote

windows 10 firewall: block any ip address but one

It depends on what the default behavior for Inbound connections is, If it is "allow", it will only need one rule : netsh advfirewall firewall add rule name="my-3389" dir=in action=...
sosogh's user avatar
  • 11
1 vote

How to enable folder sharing using netsh?

Maybe I haven’t understood your question correctly, but with netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes you configure firewall for SMB protocol(SMB is used ...
batistuta09's user avatar
  • 9,200
1 vote
Accepted

Set Remote Computer To DHCP Enabled Without Using WinRM

WMI works well: $networkAdapterConfig = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName 'SomeComputerName' $networkAdapterConfig.EnableDhcp()
David Klempfner's user avatar
1 vote

Prevent IIS listening on Port 443 for Single IP Address

By default, IIS binds to all IP addresses even when you specify an IP Address in the Site's Binding. What you need is runing following command in an elevated command prompt. netsh add iplisten ...
Tony's user avatar
  • 111
1 vote

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

You can use these commands: netsh advfirewall firewall add rule name="My Trusted In" dir=in action=allow protocol=ANY remoteip=62.9.97.12 netsh advfirewall firewall add rule name="My Trusted Out" ...
teleios's user avatar
  • 11
1 vote

Disable DHCPv6 client in Windows

I know this is an old question, but I wanted to add in case this was useful. The command I use for disabling DHCPv6 and router discovery for IPv6 on all of a system's network interfaces is as follows: ...
FrostWolf's user avatar
1 vote

How can I use netsh to find a rule using a pattern

This is admittedly a coat-tails answer but a comment would obscure the point. This is also admittedly answering a slightly different question: how can I not use netsh and still find rules? :-) I ...
BaseZen's user avatar
  • 396
1 vote

Can we use wildcards with NETSH HTTP ADD URLACL in Windows 7 / 2008r2?

My best guess was to set exactly the same url you add to the listener and do: netsh http add urlacl url="[exact same value]" user=%USERDOMAIN%\%USERNAME%
Noman_1's user avatar
  • 121

Only top scored, non community-wiki answers of a minimum length are eligible