Announcing the PowerShell Module for Azure ML

This post is authored by Hai Ning, Principal Program Manager at Microsoft. 

Today we are excited to announce the availability of the PowerShell module for Azure ML in public preview mode. You can view the documentation, download the module and the full source code here

What Is It?

This is a .NET based PowerShell DLL module that allows end user to fully manage Azure ML workspaces, experiments, datasets, web services and web service endpoints. It contains full source code which also has a cleanly separated C# API layer. This means you can also reference this DLL from your own .NET project and operate Azure ML through .NET code. In addition, you can also find the underlying REST APIs the DLL depends on and leverage the REST APIs directly from your favorite client as well.

What Can You Do with It?

Below is a subset of common tasks you can do with this PowerShell module. There is a lot more so please be sure to check out the full documentation.

Here is a quick example of running an existing experiment:

#Find the 1st Experiment named “xyz”
$exp = (Get-AmlExperiment | where Description -eq ‘xyz’)[0]
#Run the Experiment
Start-AmlExperiment -ExperimentId $exp.ExperimentId 

For a more in-depth use case, please review this article on using the PowerShell module to automate a very commonly requested task: Creating multiple trained models and web service endpoints from a single experiment in Azure ML.

How Do I Get Started?

Simply download the release package and follow the instructions for installation. You will need to unblock the downloaded/unzipped DLL and then import it into your PowerShell environment. Most of these commandlets require that you supply the workspace id, workspace authorization token, and the Azure region the workspace is in. You can do that through a default config.json file. These are all covered in detail in the installation instruction. You can of course also clone the git tree and modify/compile the code locally using Visual Studio.

What’s Next?

We will continue to evolve this PowerShell library. In particular, Azure ML workspace and web service are on track to become Azure managed resources, i.e. ARM resources. These commandlets will provide support to the new ARM based resources in the future.

We hope you enjoy the power of automation enabled by this PowerShell module and would love to hear your feedback.

Hai