- Products
- Solutions
- Resources
- Trials
- Support
- Partners
- Communities
The above code wouldn't work for me in ARS 6.5. I've resorted to reading the edsaParameters value directly. The below code will create a $params object with properties on that object corresponding to the parameter names configured for the scheduled task. Access the parameters like this: $params.MyFirstParamater $params.AnotherParameter
#Read in the Parameters for the Task,
#add them as properties on a $params object.
$objTask = [ADSI]$Task.AdsPath
$params = New-Object PSObject
$objTask.edsaParameters| %{
$xParameter=([xml]$_).DocumentElement
Add-Member -InputObject $params NoteProperty $xParameter.Name $xParameter.'#text'
}
The above code wouldn't work for me in ARS 6.5. I've resorted to reading the edsaParameters value directly. The below code will create a $params object with properties on that object corresponding to the parameter names configured for the scheduled task. Access the parameters like this: $params.MyFirstParamater $params.AnotherParameter
#Read in the Parameters for the Task,
#add them as properties on a $params object.
$objTask = [ADSI]$Task.AdsPath
$params = New-Object PSObject
$objTask.edsaParameters| %{
$xParameter=([xml]$_).DocumentElement
Add-Member -InputObject $params NoteProperty $xParameter.Name $xParameter.'#text'
}