Question about Run .net Script Activity

Hi everyone, I have a loaded question concerning Orchestrator. I configured my orchestrator environment to be able to use the latest version of powershell in .net script activities (detailed here: http://get-cmd.com/?p=3731) and this all seems to work great. I recently set up a SQL table on a SQL server that I would like to query from using the module named SqlServer.

I am able to obtain the data I expect when running the commands directly in powershell, but am having difficulty getting the data to return back to Orchestrator and storing it in a variable.

Here’s a sample of a query for the Job Code WS43:

Those values would be used to determine if a particular system access is to be granted or not. Basically, if the value returned is “Skip” then that Manual Activity status would be set to Skipped. If not, then no status change takes place.

My .net script activity is basically just taking the data and passing it through to the qualifier.

If you look at the previous picture, you’ll see I pipe out the catch to a text file. All I keep getting in the text file as my exception is “Read-SQLTableData is not known as a valid command.” I’ve installed the SqlServer module on the Orchestrator server, and also on the SQL server housing the SQL table I am referencing.

So, I guess my question is (after all this rambling explanation) where is this .net script being run from? I would think as an Invoke-Command, it would be run from the SQL server. Outside of that, I would think it would be run from the Orchestrator server. Both of which have the module installed.

Hopefully I’ve made some kind of sense here, and if not, I’ll gladly clarify anything.

5 replies