Before running a parameterised script in your deployments, it’s important to test that the tab completion is working. To do this, open a PowerShell console and type the script name and a hyphen then press the {tab} key.
Your script should return the available script parameters and function just like a regular PowerShell cmdlet. This test will prove that your script will pass parameters correctly when run in a task sequence.
You can find out more about script parameters by typing Get-Help About_Parameters in a PowerShell console. Below is a basic construct for a parameterised script.
Param{
$Name,
$Value
}
Begin{}
Process{Write-Output "Values are $Name and $Value"}
End{}
