![](/img/trans.png)
[英]How can I create scheduled tasks via Powershell 4.0 on Windows Server 2008 R2?
[英]How can I create a windows service ACS by powershell? The server failed to authneticate the request
所以,我下載了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
在發出new-azuresbnamespace命令之前,需要設置/選擇訂閱。
選擇-AzureSubscription -SubscriptionName
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.