netsh is the command name for the NetShell utility, which is used as a scripting interface for monitoring and configuring network interfaces, firewall, routing and remote access under Microsoft Windows.
Questions tagged [netsh]
410 questions
3
votes
1 answer
Create SSL endpoint on port 443 for self-hosted OWIN listener
I am using a self-hosted OWIN listener for a Web API implementation that runs in a local process. However, I am unable to listen on port 443 successfully.
The following works:
var startOptions = new…

aman
- 127
- 2
- 6
3
votes
1 answer
C# Self Hosted Web - TCP Port used by another application (win10)
Just start to get an exception when trying to use a self-hosted webapi application in Windows 10 1703 (15063.483)
VS2017: Version 15.2 (26430.15) Release
VisualStudio.15.Release/15.2.0+26430.15
I tried running VS in administrator mode, with the same…

Carol AndorMarten Liebster
- 879
- 6
- 26
3
votes
1 answer
Save a specific field from output into a variable on windows CMD
I want to read the wlan-key from netsh wlan show hostednetwork setting=security and save it in a variable so i can display it without the unneeded information like..:
echo your key is %wlan_key%
I already googled the problem on my own and found a…

05x
- 81
- 1
- 1
- 9
3
votes
0 answers
What is Error code 1 for netsh.exe?
When running the following command I sometimes get returning Error code 1 and the certificate is not bound in that case.
C:\Windows\System32\netsh.exe http add sslcert ipport=0.0.0.0:20102 certhash=1949E24D0B5F557A7525D739F7229B97ADD344FF…

Powerslave
- 531
- 2
- 7
- 24
3
votes
1 answer
Netsh can't filter a port in windows
I'm using the windows platform tools named "netsh" to do the packet capture.
But I can't filter a specified port even when I REALLY do the correct configurations.
I using the following command to start a packet capture task:
netsh trace start…

scugxl
- 317
- 4
- 15
3
votes
0 answers
netsh portproxy hangs multiple IP addresses
Windows Server 2008 R2, fully patched and updated.
I have 4 static IPs on a dedicated server. I will refer to them as follows:
x.x.x.x
y.y.y.y
z.z.z.z
a.a.a.a
x.x.x.x is the default external and internal IP address of the server.
All…

user1813798
- 51
- 2
3
votes
2 answers
How to escape hash symbol(#) in netsh command
Our company main Wifi ssid is called "#TestRIG". I need to switch SSIDs during the automation test frequently.
I tried the command as below.
netsh wlan connect name="#TestRIG"
netsh wlan connect name=^#TestRIG
netsh wlan connect name=\#TestRIG
None…

jinhua
- 31
- 2
3
votes
2 answers
Android: connect to Wifi using terminal
On Windows I can connect to a specific Wifi using:
netsh wlan connect ssid=SSID1
The command iwconfig doesn't work on Android. The command svc wifi enable just turns the Wifi on. Is there a terminal command for Android that connect to a specific…

bodruk
- 3,242
- 8
- 34
- 52
3
votes
1 answer
netsh and blocking access to all but one WLAN
Currently, I'm using this:
netsh wlan add filter permission=block ssid="WLAN1" networktype=infrastructure
to hide specific WLAN SSIDs from showing up in the systray. Since there's usually more than one of them available, I've decided to put them…

FiddlingAway
- 1,598
- 3
- 14
- 30
3
votes
1 answer
Failure calling netsh to add firewall exception
Hi I tried to add Firewall exception for my exe in a machine through my go code
This is my code
// Firewall.go
package main
import (
"fmt"
"os/exec"
)
func main() {
cmdArgs := []string{"advfirewall", "firewall",…

Murali Manohar
- 589
- 7
- 35
3
votes
1 answer
What is netshell equivalent command in Powershell for Reserving Url?
In netshell we use something like this:
http add urlacl url=https://+:{0}/ user={1}
I need equivalent functionality to be achieved in Powershell or any tool other than netsh.
Can you give me direction?

Rohith Shetty
- 31
- 1
- 3
3
votes
2 answers
Batch commands to change IP and DNS
I have written few commands in batch to execute them on choice basis. I am using 2 IP addresses for which I have to change IPv4 and DNS every time I switch between IPs.
I have done this code and this works correctly if I execute line by line but in…

Taranjeet Singh
- 35
- 1
- 1
- 5
3
votes
2 answers
Netsh wlan hostednetwork only 5 GHz
I have a hostednetwork installed via:
netsh wlan set hostednetwork mode=allow ssid=Hotspot key=7Tutorials
when I start it with:
netsh wlan start Hotspot
it starts a WLAN Hotspot in 2,4GHz Net which works fine.
So my question is: Is there a way to…

S.Spieker
- 7,005
- 8
- 44
- 50
3
votes
1 answer
netsh show rules filtered by local port
The commande here allow to show all the rules,
netsh advfirewall firewall show rule dir=in name=all
I would like to filter
rules which are related to the port 445.
currently enabled rules.
I read the documentation and i could see that for…

MUY Belgium
- 2,330
- 4
- 30
- 46
3
votes
0 answers
Unable to Connect to Wi-Fi using Command Prompt in Windows 8.1
I am unable to connect to Wi-Fi using command prompt. I want to connect to Wi-Fi using command prompt as per my requirement. I can't use GUI controls or any other third party tools for this purpose
Here is what I am doing:
I am adding the wi-fi…

Akash
- 179
- 1
- 3
- 12