@Arie: Yes, you could launch a remote pirecalc task from the PI ACE server. You have several options:
- Use System.Diagnostics.Process class to launch a remote task on the PI Server. This can be done in your code directly. It would run with security context of the PIACEScheduler process unless you impersonate the context with another account. You would need to store the credentials somewhere. This approach is less firewall friendly as more ports would be required to allow such call.
- Use Powershell and PS remoting to launch a remote task on the PI Server. This approach is firewall friendly as only one port (5985 or 5986 if using SSL) is required to allow such call.
- Another option would be to apply the same logic as described previously but outside a PI ACE module.
I hope it helps!
I've been trying around with psexec (from the MS SysInternal). But I think think I'm doing something wrong :(
I've created a batchfile on the PI Server (in PI\bin) which I try to start from my own machine first (as commandline command).
so I give (on my own machine the following command:
psexec \\PIServername\ \\PIServername\d$\PI\bin\test.bat
But that doesn't work. The batchfile is found, but it seems that the batchfile is trying to start the pirecalc /exe command on my own machine.
What am I doing wrong? Maybe you have some example coding for me?
I've got it!
The commandline command should be:
C:\WINDOWS\system32>psexec \\PISERVER -i -s -u DOMAIN\USERNAME -p PASSWORD d:\pi\bin\test1.bat
And the batchfile which I start contains the following:
D:\PI\bin\pirecalc /exe="TestTag, 14-feb-2014 12:00, 14-feb-2014 12:01"
I've noticed that I had to enter the full pathname to the recalc.exe in the batchfile, otherwise I wouldn't recalculate.