所以,我下载了azure powershell,因为我想通过PowerShell创建一个带有附加ACS的服务总线命名空间,这显然不能通过UI完成。
http://msdn.microsoft.com/en-us/library/azure/dn170478.aspx
通过ACS的Service Bus身份验证通过配套的“-sb”ACS命名空间进行管理。如果要为Service Bus命名空间创建协同ACS命名空间,请使用New-AzureSBNamespace PowerShell cmdlet创建Service Bus命名空间。例如: Windows PowerShell
New-AzureSBNamespace <namespaceName> "<Region>”
例如,如果创建名为contoso.servicebus.windows.net的Service Bus命名空间,则会自动配置名为contoso-sb.accesscontrol.windows.net的配套ACS命名空间。对于2014年8月之前创建的所有命名空间,创建了一个附带的ACS命名空间。
所以,我做的是:
Get-AzurePublishSettingsFile
这让我下载了一个文件然后我用了:
Import-AzurePublishSettingsFile –PublishSettingsFile "C:\Users\valencil\Google Drive\Tools\Pay-As-You-Go-9-5-2014-credentials.publishsettings"
导入并没有抛出任何错误,但是当我尝试时:
New-AzureSBNamespace "levalencia" "West-Europe”
我收到了这个错误:
New-AzureSBNamespace : ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this
subscription.
At line:1 char:1
+ New-AzureSBNamespace "levalencia" "West-Europe”
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureSBNamespace], CloudException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceBus.NewAzureSBNamespaceCommand
答案 0 :(得分:3)
您需要在发出new-azuresbnamespace命令之前设置/选择订阅。
选择-AzureSubscription -SubscriptionName