當我嘗試執行Start-AzureService時,我一直在收到上述錯誤。沒有指定默認訂閱。使用Select-AzureSubscription -Default <subscriptionName>設置默認訂閱
以下信息,執行時提示獲取-AzureAccount:執行時
Id Type Subscriptions Tenants
-- ---- ------------- -------
[email protected] User 12345678-1234-5678-9012-3456789{12345678-1234-5678-9012-3456789}
和隨後的信息提示獲取-AzureSubscription:
SubscriptionId : 12345678-1234-5678-9012-3456789
SubscriptionName : My Production (Pay-As-You-Go)
Environment : MyCloud
DefaultAccount : [email protected]
IsDefault : True
IsCurrent : True
TenantId : 12345678-1234-5678-9012-3456789
CurrentStorageAccountName :
Select-AzureSubscription : Parameter set cannot be resolved using the specified named parameters.
提示,當我嘗試按照建議的命令:
Select-AzureSubscription -Default "My Production (Pay-As-You-Go)"
要獲得幫助,它實際上是「Get-Help」。 –
Hi CmdrTchort, 沒有幫助。 使用Select-AzureSubscription -Default -SubscriptionName「我的產品(現收現付)」以「警告:當前和默認參數已被棄用。Select-AzureSubscription將始終更新默認訂閱」和Start-AzureService :沒有指定默認訂閱。 當afterword嘗試使用Select-AzureSubscription -Default設置默認預訂時。在嘗試使用Start-AzureService -PassThru -Profile STAGING -ServiceName myService時會再次提示。 –
BigAlbert
Add-AzureAccount解決了問題 – montelof