Hi :
Just like to know if i can run my powershell script from C# QAction code?
Also, my powershell prints the output to stdout or a file. If the QAction can run the powershell script how can i get the output presented in the dataminer element page?
THanks
Hi,
Could this link further help you?
Basically that says to create a Powershell object: PowerShell ps = PowerShell.Create(); , then add the command to execute: ps.AddCommand("Get-Process"); , then invoke the command: ps.Invoke(); , the returned object of the Invoke method contains the result.
If the output writes it to a file then a simple StreamReader could read out the file contents.
The results coming from the Invoke method and/or coming from reading out the file can then be used to fill in the parameters.
Regards