无法使用PowerShell

时间:2018-02-12 11:56:30

标签: azure azure-powershell azure-notificationhub

我使用以下JSON输入文件在PowerShell中创建新的通知中心:

"Name": "my-tester",
"Location": "West US",
"Tags": {
    "tag1": "tag"
},  
"Properties": {
    "ApnsCredential": {
        "Properties": {
            "KeyId": "xxx",
            "Token": "xxx",
            "AppName": "xxx",
            "AppId": "xxx",
            "Endpoint":"https://api.push.apple.com:443/3/device"
        }
    },
    "GcmCredential": {
        "Properties": {
            "GoogleApiKey": "yyyy"
        }
    }
}

}

PowerShell命令是:
$newHub = New-AzureRmNotificationHub -Namespace $nameSpace -ResourceGroup $resourceGroup -InputFile ".\$newHubName-HubProps.json"

该命令确实创建了集线器......但PNS凭据为空(我也从门户验证)。所以,当我检查 使用此PowerShell新创建的集线器,我什么都没得到。这是PowerShell命令:
$newHubPnsCreds = Get-AzureRmNotificationHubPNSCredentials -Namespace $nameSpace -ResourceGroup $resourceGroup -NotificationHub $newHubName

# This returns nothing: $newHubPnsCreds.GcmCredential

感谢任何帮助。

问候

0 个答案:

没有答案
相关问题