簡體   English   中英

NET項目中的Azure Power Shell cmdlet dll

[英]Azure power shell cmdlet dll in .net project

在這里,我有一個關於如何在.net項目中使用Azure Power Shell cmdlet dll的問題。 我在msdn中看到了這個線程:使用powershell cmdlet,我們可以使用此命令。 Remove-AzureVM -ServiceName -Name這將涉及Microsoft.WindowsAzure.Management.ServiceManagement.dll下的dll,其路徑為:C:\\ Program Files(x86)\\ Microsoft SDKs \\ Windows Azure \\ PowerShell \\ Azure我使用反射器將其打開dll。 而且我可以獲得RemoveAzureVMCommand類,但是如何使用該類實現與powershell cmdlet相同的功能? 有人可以給我分享一些光嗎? 非常感謝!

Azure PowerShell Cmdlet本質上是Windows Azure Service Management API的包裝。 您可以做的是編寫自己的C#代碼來調用“刪除角色”( http://msdn.microsoft.com/zh-cn/library/windowsazure/jj157184.aspx )函數,該函數將刪除VM。

希望這可以幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM