Sharath Chandra
Sharath Chandra

Reputation: 704

Script the windows azure command line utilities

There is java based server component responsible for remote management of amazon virtual machines. I need to write an azure adapter for this component. I thought I would be better off using node.js based command line utils for azure management.

I wanted to know the way to invoke scripts either from c#/java and then process the output so that I could pass the output to the calling server component.

for e.g. An instruction to create a new vm will return the instance id back to the calling method. Basically I would need to script the logic in to the adapter methods.

Any directions will be of great help.

-Sharath

Upvotes: 0

Views: 124

Answers (1)

Sandrino Di Mattia
Sandrino Di Mattia

Reputation: 24895

Depending on the technology you're choosing you have a few options:

  • Using the System.Management.Automation assembly you can call any PowerShell script in a C#/.NET application
  • In Java you can call a batch file that runs a PowerShell script (where you would invoke the Azure cmdlets). There's an interesting discussion on the MSDN forum.
  • And why not use the Service Management API? This is a REST API that makes it possible to call it from .NET, Java, Node, ...

Upvotes: 1

Related Questions