Passing script parameters
From PowerGUI Wiki
Passing script parameters
The toolbar in the Script Editor contains a Script Parameters text box that you can use to specify the parameters that will be passed to the script when you run it.
To pass a parameter containing a space, put that parameter in single- or double-quotes or escape the space using the PowerShell escape character (the backtick: `). For example, if you wanted to pass in the string PowerShell Rocks, you could enter “PowerShell Rocks”, ‘PowerShell Rocks’, or PowerShell `Rocks.
You can also pass in subexpressions and any other PowerShell construct that you can use in PowerShell when executing a function, script block, or external script.
USAGE EXAMPLE
Create the following script:
param ($firstInt, $secondInt)
$result = $firstInt * $secondInt
$result
Enter the following values in the script window:
5 7
Run the script by pressing F5. The variables will have the values as follows:
$firstInt = 5
$secondInt = 7
$result = 35
For more information, see this tutorial on YouTube: [1]
