2014-09-05 67 views
1

因此,我下载了Azure PowerShell,因为我想通过PowerShell创建一个带有附加ACS的服务总线命名空间,这显然不能通过UI完成。如何通过PowerShell创建Windows服务ACS?服务器无法验证请求

http://msdn.microsoft.com/en-us/library/azure/dn170478.aspx

通过ACS服务总线认证通过同伴“-sb” ACS命名空间管理。如果您希望为Service Bus名称空间创建协同ACS名称空间,请使用New-AzureSBNamespace PowerShell cmdlet创建您的Service Bus名称空间。例如: 的Windows PowerShell

New-AzureSBNamespace <namespaceName> "<Region>” 

例如,如果你创建一个服务总线命名空间称为contoso.servicebus.windows.net,叫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" 

进口didnt抛出任何错误,但是当我尝试:

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 

回答

3

在发出new-azuresbnamespace命令之前,您需要设置/选择预订。

Select-AzureSubscription -SubscriptionName

+0

不存在。也许你的意思是这个http://msdn.microsoft.com/en-us/library/dn722501.aspx – 2014-09-05 12:45:50

+0

我试过了,我得到了这个问题:http://screencast.com/t/lFvgYAn2tKLH – 2014-09-05 12:48:50

+0

我认为你失踪了一些天青的powershell位确实存在:http://msdn.microsoft.com/en-us/library/dn495203.aspx我也在我自己的机器上验证了这个cmdlet的存在(它有Azure PowerShell 8.7.1) – BrentDaCodeMonkey 2014-09-05 13:20:04

相关问题