0

I need to install and call a Powershell script from an Azure Web job. The Powershell script will then call a java based command line tool.

And also, in an Azure environment, how would I know what the path to the files (Powershell and Java) would even be?

I am thinking of something like this:

private static void CallPowershell([QueueTrigger("queueName")CloudQueueMessage, TextWriter log)
{
  Process.Start("/pathToFile.ps");
}

Thanks.

3
  • Does it need to be a script on that server? You could have a webhook to an Azure Automation script Commented Oct 14, 2015 at 19:35
  • Good point Michael B. What I actually need to do is call a command line based tool written in java. I am guessing that I have to install that tool somewhere, and I was guessing that I would wrap the call in a Powershell script. Does Azure Automation work in this scenario? I am relatively new to Azure. Commented Oct 14, 2015 at 19:43
  • 1
    In that case that is probably not the best way to go! I'm not much of a Java person! but you could potentially run a java web job have a read of this see if it puts you on the right track Commented Oct 14, 2015 at 19:51

1 Answer 1

1

Running a PowerShell script in WebJobs is native, but here is a post on how to get it done.

http://blogs.msdn.com/b/nicktrog/archive/2014/01/22/running-powershell-web-jobs-on-azure-websites.aspx

The challenge will be how to make that PowerShell run the Java code.

Sign up to request clarification or add additional context in comments.

1 Comment

That is definitely the challenge.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.