This task sequence step runs the specified Windows PowerShell™ script on the target computer. For more information about what script accomplishes this task and which properties are used, see ZTIPowerShell.wsf.
The unique properties and settings for the Run PowerShell Script task sequence step type are:
Properties
Name |
Description |
Type |
Set this read-only type to Run PowerShell Script. |
Settings
Name |
Description |
PowerShell script |
The Windows PowerShell script to be run when this task sequence step is processed |
Parameters |
The parameters to be passed to the Windows PowerShell script. These parameters should be specified the same as if you were adding them to the Windows PowerShell script from a command line. The parameters provided should be only those parameters the script consumes, not for the Windows PowerShell command line. The following example would be a valid value for this setting: -MyParameter1 MyValue1 -MyParameter2 MyValue2 The following example would be an invalid value for this setting (bold items are incorrect): -nologo -executionpolicy unrestricted -File MyScript.ps1 -MyParameter1 MyValue1 -MyParameter2 MyValue2 The previous example is invalid, because the value includes Windows PowerShell command-line parameters (-nologo and –executionpolicy unrestricted). |
Related Topics
Specific Properties and
Settings for Task Sequence Step Types