简体   繁体   中英

Azure power shell cmdlet dll in .net project

Here I have a question about how to use Azure power shell cmdlet dll in .net project. I got a look at this thread in msdn: Use powershell cmdlet we can use this command. Remove-AzureVM -ServiceName -Name And this will involve the dll under Microsoft.WindowsAzure.Management.ServiceManagement.dll which path is: C:\\Program Files (x86)\\Microsoft SDKs\\Windows Azure\\PowerShell\\Azure I use reflector open this dll. And I can get the RemoveAzureVMCommand class, but how to use this class achieve the same thing as powershell cmdlet? Can some one share some light to me? Thanks very much!

Azure PowerShell Cmdlets are essentially wrappers around Windows Azure Service Management API. What you could do is write your own C# code to invoke "Delete Role" ( http://msdn.microsoft.com/en-us/library/windowsazure/jj157184.aspx ) function which will remove the VM.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM