Creates parameter set
Syntax
New-DtTaskParameters [-ScriptPath] <String> [[-Arguments] <String>] [<CommonParameters>]
Detailed Description
Creates a parameter set to be used with the Invoke-DtQueueTask cmdlet.
Parameters
Name | Type | Description | Required | Pipeline Input |
---|---|---|---|---|
ScriptPath | String |
Specify the full path and script name |
true | false |
Arguments | String |
Specify any arguments that need to be passed to the script. |
false | false |
Outputs
Examples
$DtScript = New-DtTaskParameters -ScriptPath "C:\PathDir\ScriptName" -Arguments "arg1 arg2" |
The script called ScriptName, located in C:\PathDir, along with two arguments, is stored in the variable DtScript.
$DtPsScript = New-DtTaskParameters -ScriptPath "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -Arguments "-File ""C:\PathDir\Script.ps1"" ""-Arg1 argument1_info -Arg2 argument2_info"" -ExecutionPolicy RemoteSigned" |
The script to launch PowerShell and run the script called Script.ps1, located in C:\PathDir, along with two arguments and the ExecutionPolicy parameter, is stored in the variable DtPsScript.