When executed, iwsh.wsf provides a command-line
interface to evaluate and execute ad-hoc code. Enter expressions, and they
are evaluated, or enter a blank line to toggle multiline statement entry.
By default, the scripting engine used is VBScript, or JScript if the //job:jscript argument is specified. Press Ctrl+Z, then Enter to exit.
Generally, IWSH is good for testing language features
Interactive Windows Scripting Host [VBScript]
CBool("3")
True
CBool(Now)
TrueIWSH is also good for complex mathematical calculations:
Interactive Windows Scripting Host [VBScript] Enter Enter statements, followed by a blank line to execute: Function Secant(x) Secant= 1/Cos(x) End Function Enter Executed. Secant(1) 1.85081571768093
One particularly handy use is as a date calculator, leveraging the date support in VBScript:
Interactive Windows Scripting Host [VBScript] Date + 90 10/06/2005 #Dec 31# - #Oct 31# 55