In ToDoList I have defined a User Defined Tool that calls a PowerShell script:
Code: Select all
Path : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Arguments : -noexit -File "C:\MyPath\SendMail_Defizitbewertung.ps1
Now I wanted to add a parameter (ToDoList should send the title of the selected task as parameter to the PowerShell Script).
For the beginning I started with a static text for testing the parameters.
So I added in ToDoList the following text at the end of the Arguments (the first character is a blank):
Code: Select all
"OLLI"
Code: Select all
param (
[String]$ParamAnwendung
)
Write-host "String Parameter: $ParamAnwendung"
pause
When I remove the parameter "OLLI" again, the the PowerShell is opening and displaying some text (it is working).
I also tried adding the following text at the end of the Arguments (first character is a blank):
Code: Select all
-ParamAnwendung "OLLI"
The strange thing is: when I run the script within a PowerShell console then it works.
Here both of the following ways to add parameters are working:
Code: Select all
C:\MyPath\SendMail_Defizitbewertung.ps1 "OLLI"
C:\MyPath\SendMail_Defizitbewertung.ps1 -ParamAnwendung "OLLI"
Am I doing something wrong?
Or is this a problem with ToDoList?
Best regards
OLLI