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
  • Hi Ben,

    Not sure about through Powershell but it looks reasonably easy through vbscript, is that an option maybe:

    Set objSchT = GetObject("EDMS://CN=MyTask,CN=Scheduled Tasks,CN=Server

    Configuration,cn=Configuration")
    objSchT.Parameters("Par1") = "100"
    objSchT.SetInfo

    Thanks,
    Ewan

Reply
  • Hi Ben,

    Not sure about through Powershell but it looks reasonably easy through vbscript, is that an option maybe:

    Set objSchT = GetObject("EDMS://CN=MyTask,CN=Scheduled Tasks,CN=Server

    Configuration,cn=Configuration")
    objSchT.Parameters("Par1") = "100"
    objSchT.SetInfo

    Thanks,
    Ewan

Children
No Data