cscript - PowerCram Blog

Set IIS 6 (and IIS 7) custom HTTP headers from the command line

Command line method to set the Custom HTTP Headers.*Must execute from (default) c:InetpubAdminScripts: cscript adsutil.vbs set w3svc/HttpCustomHeaders “X-Powered-By: ASP.NET” “<Header 2>: <Value 2>” “<Header 3>: <Value 3>” Just replace “Header 2”: “Value 2” and “Header 3”: “Value 3” with your own values. Add more as desired. Note: This command updates/replaces current values and does not add to them […]

Running scripts using the command-line-based script host (Cscript.exe)

You can run scripts with the command-line-based script host by typing the following at the command prompt: cscript [script name] [host options] [script arguments] Where: • script name is the name of the script file, including the file name extension and any necessary path information. • host options are the command-line switches that enable or disable various Windows […]