1

我有一個Windows 2008 R2機器,我已經安裝了VS2010和SP1,從下面的Windows Azure SDK 1.7和Azure的SDK的其他所有工具和PowerShell cmdlet的鏈接WAPPSCmdlets沒有安裝在本機上

https://www.windowsazure.com/en-us/manage/downloads/

當我運行Windows PowerShell爲Windows Azure的cmdlet,它顯示錯誤:

Add-PSSnapin : The Windows PowerShell snap-in 'WAPPSCmdlets' is not installed o n this machine. At line:1 char:21 + cd c:\; add-pssnapin <<<< WAPPSCmdlets + CategoryInfo : InvalidArgument: (WAPPSCmdlets:String) [Add-PSSn apin], PSArgumentException + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.Ad dPSSnapinCommand

我也曾嘗試下面的鏈接,但沒有用。 http://social.msdn.microsoft.com/Forums/is/windowsazuredevelopment/thread/4c59fc7e-3ead-482e-88c3-f5555e915c84

回答

1

你能嘗試手動加載模塊?

Import-Module "C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1" 

,然後簡單地嘗試任何cmdlet的(如Add-AzureCertificate),看看是否可以使用它。

更新:由於Add-AzureCertificate適合您,這意味着所有cmdlet現在都可用。爲了使事情變得更容易,您可以簡單地在桌面上創建一個具有以下目標的快捷方式:

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -NoExit -Command "cd 'C:\'; Get-ChildItem 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure*.psd1' | ForEach-Object {Import-Module $_}"

+0

是的我已經執行了上述命令,但之後只是簡單的命令提示符沒有響應。即使在這之後,如果我打開Windows Powershell for Windows Azure Cmdlet,那麼它顯示的錯誤也是如此。 Add-PSSnapin:在本機中未安裝Windows PowerShell管理單元「WAPPSCmdlets」。 –

+0

是Add-AzureCertificate正在工作,但WAPPSCmdlets錯誤仍然存​​在。 –

+0

由於您可以將cmdlet加載爲模塊或管理單元,並且您提到Import-Module可以工作,您可以繼續使用它。不需要以SnapIn的形式安裝cmdlet。因此,每次需要使用這些cmdlet時,只需按照建議的@Sandrino導入模塊並使用Cmdlet即可。 –

相關問題