Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to switch between Home, Public, and Work modes from the command line?

share|improve this question

2 Answers 2

It doesn't appear to be possible from the "regular" command line (unless the netsh command does what you need, see Nixphoe's answer), but if you on't mind using PowerShell for what ever it is you're doing then you can have a look at this blog post on MSDN.

Basically, Vista had a COM based api which you could use PowerShell to interact with. I assume it is still there in Win7. The blog post includes a sample script.

share|improve this answer

Try using netsh. Here's some examples. You would want to dump your config to a file

netsh -c interface dump > c:'location1.txt

Then import it depending on where you're located.

netsh -f c:'location1.txt
share|improve this answer
1  
The dumped settings don't seem to have any mention of network type setting, am I missing something? –  Acorn Jul 15 '11 at 11:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.