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.

I'm running an IIS command on a remote server via PSEXEC.

the command I'm running has the "set" keyword, which is a command-line reserved keyword.

My command looks like this and throws an error.

psexec \\server  c:\windows\system32\inetsrv\appcmd set config "site" -section:system.webServer/httpRedirect /enabled:"True"

Is there any way I can escape the "set" keyword so the command-line process ignores it?

share|improve this question
    
I have to point out that the Windows command line is not MS-DOS. While it shares some syntax due to its history, internally it has been nothing like DOS since Windows 2000 (and even more so since Vista). Please do not refer to it as DOS unless you are actually running Windows ME or older. This also doesn't have anything to do with batch files, strictly speaking. –  Bob Nov 7 '13 at 2:09
1  
set is not a keyword, as far as I know. It is a built-in command, and the command interpreter doesn't (shouldn't?) care if it turns up as a parameter. Could you provide an error message? –  Bob Nov 7 '13 at 2:12

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.