Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.15k stars 3.78k forks source link

Support for devtest lab VM operations? #7463

Open rjmholt opened 5 years ago

rjmholt commented 5 years ago

Hi, I'm trying to create and manage a VM within a devtest lab.

I've found:

But I'd really like to use PowerShell to do this (since I'm trying to write a PowerShell script/module to launch an environment to test PowerShell).

Thanks for your help!

cormacpayne commented 5 years ago

@rjmholt Hey Robert, it appears that we don't have any cmdlets around this functionality in the AzureRM.DevTestLabs module, but the operations are in the SDK used by this module.

@ryanvog Hey Ryan, do you know if there are plans for the DevTestLabs team to implement cmdlets for these missing operations in the SDK?

rjmholt commented 5 years ago

Hey @cormacpayne, thanks for that info. I was actually playing around with exactly the source you linked when you responded. (For anyone curious, made a dummy dotnet core project with that as a dependency, published it and Add-Typed it).

Using the SDK directly with PowerShell isn't terribly ergonomic at present though, since it makes heavy use of partial classes and extension methods. I also noticed that the API types don't align closely to Azure PowerShell's, so plugging existing Azure PowerShell into the SDK requires a fair amount of massaging. But I think it is still possible.