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
0
votes
1 answer
SSL with WCF not working! How to Debug
I am dabbling with WCF and SSL and have hit a bit of a problem.
I have a self-hosted WCF service and a basic client which connects to request a token.
I have it set up on my development machine it appears to communicating over SSL just fine.
But…

PaulMcCaffery
- 145
- 1
- 9
0
votes
1 answer
netsh command to change to static ip only changes my default gateway?
I'm trying to change my ip address to a static ip addres with the following netsh command:
netsh interface ip set address name="Wi-Fi" static x.x.x.x 255.255.255.0 x.x.x.x 1
But this only changes my default gateway and doesn't affect anything else.…

MeesterPatat
- 2,671
- 9
- 31
- 54
0
votes
1 answer
How to check if port or program is allowed in Windows 2008 firewall using netsh advfirewall commands
I'm trying to write a post-install script that will be used to validate the install and configuration of a BladeLogic RSCD Agent on a server. One of the things I need to check is if the Windows Firewall is enabled and if the port TCP 4750 -or-…

Yanick Girouard
- 4,711
- 4
- 19
- 26
0
votes
1 answer
HttpNamespace Registration fails with no exception
The following code works in my development computer and I am able to see that the service is registered using netsh show urlacl.
ProcessStartInfo netshPSI = new ProcessStartInfo();
// Windows XP SP3, Vista SP2, 7 SP1 or 8 …

Ranjith Venkatesh
- 1,322
- 3
- 20
- 57
0
votes
1 answer
Browser is still able to access internet after changing wrong proxy
I use following command to change proxy on my machine:
netsh winhttp set proxy x.x.x.x:port
Current WinHTTP proxy settings:
Proxy Server(s) : x.x.x.x:port
Bypass List : (none)
This used the wrong proxy on purpose. I expected not be…

Jin Ho
- 3,565
- 5
- 23
- 25
0
votes
2 answers
Converting if exist rename from vista to xp
I have this batch which works to set a staic ip and subnet and back to dhcp, which works perfectly in Vista. However when trying to put it into a colleagues XP machine i get an issue with the IF Exist Rename.
Vista Code:
@echo off
cls
:start
if…

Chumbawamba
- 121
- 2
- 11
0
votes
1 answer
PowerShell/Windows scripting: Get interface name containing a specified gateway IP
I'm trying to build a Windows batch script that captures a network interface's name, based on its gateway IP, and then renames the interface. I'm having trouble capturing the interface name, which is a random string. In Windows, I can obtain the…

Matt
- 41
- 2
- 6
0
votes
1 answer
WIN2K8: Running two netsh commands in one line; hitting a syntax error
I've written a Windows script to change NIC interface metrics, and need to condense it to two commands, because of the manner in which it is executed. To render a long story short, I support an application (BladeLogic Server Automation [BSA]) that…

Matt
- 41
- 2
- 6
0
votes
3 answers
batch file to detect if wifi adapter is enabled
I tried to complete this commands in cmd but im having trouble fixing it. Can anyone help me?
netsh wlan show networks | FIND "turned off" /I /C
if "dont know what should be here" == 0 (
echo enabled
) else (
echo disabled
)
pause

Hucen Farhan
- 243
- 1
- 3
- 10
0
votes
1 answer
Using netsh advfirewall to block URLs in Windows
I know that Windows allow blocking IP addresses through netsh like so:
netsh advfirewall firewall add rule name="Block some stuff" dir=in action=block remoteip=xxx.xxx.xxx.xxx enable=yes
But is there any way to use netsh (or is there any other…

Parker
- 8,539
- 10
- 69
- 98
0
votes
1 answer
Making sure DHCP Service is ready in batch
I want to make a batch script that changes the IP of an interface on Windows XP. It is possible through the netsh utility:
netsh interface ip set address name="Local Area Connection 2" static 10.0.2.2 255.255.255.0 none
However, the netsh utility…

iTayb
- 12,373
- 24
- 81
- 135
0
votes
2 answers
How to set SQUID Proxy authentication using netsh?
I am behind a SQUID proxy. I need to set proxy settings for cmd. I'm using win7 so proxycfg cannot be used. I used netsh like this:
netsh winhttp import proxy source=ie
Internet explorer had my proxy settings already. Now the problem is that my…
user1154687
0
votes
1 answer
Using netsh in powershell: save store location for multiple commands
I have a powershell script which is designed to modify the domain's ipsec policy by adding an ip address to a specified filterlist. The problem is that when running netsh store location=domain domain=our.domain.com in my powershell script, it…

scutze
- 1
- 1
- 3
-1
votes
1 answer
Stop / Start network in autohotkey without needing to be an administrator
I'm trying to map out via AutoHotkey a keyboard shortcut to enable / disable windows networking.
I found online this solution:
ConnectedToTheInternet(flag=0x40) {
Return DllCall("Wininet.dll\InternetGetConnectedState", "Str", flag, "Int",…

user3450548
- 183
- 11
-1
votes
1 answer
How to combine two statement in one batch file?
I'm new to batch files and searching how these batch files can be combined into one:
On the first click, it will set the LAN adapter to DHCP and when click again, it will set a Static IP in the LAN adapter.
DHCP.bat
@echo off
: Disable Static…

Chie
- 1
- 1