This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to set Parameters in Scheduled Tasks wtih Powershell

Hi,

how can i set a Parameter for a Scheduled Task in ARS 6.5 with Powershell?

I added the parameters on the scheduled Task.

In the SDK is only a VBS HowTo (Topic "Specifying Parameters for Scheduled Tasks").

I tried it on different ways in Powershell:
---
$Task = Get-QADObject "<Scheduled Task>"
$Task.Parameters("NewName") = "Test123"
Error ParameterizedPropertyAssignmentFailed
---
$Task = Get-QADObject "<Scheduled Task>"
$Task.Put("NewName, "test123")
Error MethodNotFound
---

Regards
BEN


Parents
  • Set-QADObject -Identity $NewTaskObjDN -ObjectAttributes @{edsaParameters=$edsaParameters}

    In this case I copied the parameters from one task to another.  The parameters are stored as an XML string so you could ( not tested ) construct this as follows:

    $edsaParameters += "<DBName>DataBaseName\A</DBName>"

     

Reply
  • Set-QADObject -Identity $NewTaskObjDN -ObjectAttributes @{edsaParameters=$edsaParameters}

    In this case I copied the parameters from one task to another.  The parameters are stored as an XML string so you could ( not tested ) construct this as follows:

    $edsaParameters += "<DBName>DataBaseName\A</DBName>"

     

Children
No Data