The Microsoft Doc says “-c Optional. Specifies that netsh enters the specified netsh context.”
I don’t understand what the context means here.
Could anyone explain this parameter for me? I would appreciate it if examples could be given.
The Windows utility Netsh.exe can perform a number of tasks, covering a number of technologies, e.g.
- WFP (Windows Filtering Platform)
- WinHTTP (Windows HTTP Library)
- Advfirewall (Windows Firewall)
Just run netsh to see them all and you can consider these contexts.
So in interactive mode, you can switch to a context with the -c switch, without actually running a command. E.g.:
netsh -c WinHTTP
This will switch to the WinHTTP context and do no more other than return the prompt:
From there you can get/set a proxy for example or list the commands.
Once you know what you’re doing, you probably don’t need interactive mode and you can just run the commands directly, e.g.
netsh winhttp reset proxy