Share via


Get-AzNotificationHub

取得通知中樞的相關信息。

Syntax

Get-AzNotificationHub
   [-ResourceGroup] <String>
   [-Namespace] <String>
   [[-NotificationHub] <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Get-AzNotificationHub Cmdlet 會取得指定命名空間中通知中樞的相關信息,並指派給指定的資源群組。 例如,您可以取得命名空間 ContosoNamespace 中所有通知中樞的資訊,並指派給 ContosoNotificationsGroup 資源群組。 或者,您可以使用 NotificationHub 參數,將傳回的數據限制為特定通知中樞的相關信息。 通知中樞可用來將推播通知傳送給多個用戶端,而不論平台為何,例如iOS、Android、Windows 電話 8 和 Windows 市集,這些客戶端都會使用。 這些中樞大致相當於個別應用程式,而且每個應用程式通常會有自己的通知中樞。 此 Cmdlet 只會取得中樞本身的相關信息。 需要其他 Cmdlet,例如 Get-AzNotificationHubAuthorizationRules、Get-AzNotificationHubListKeys 和 Get-AzNotificationHubPNSCredentials,才能取得中樞授權規則、連接字串 和平臺通知服務認證的相關信息。

範例

範例 1:取得特定命名空間中所有通知中樞的資訊

Get-AzNotificationHub -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup"

此命令會取得已指派給資源群組 ContosoNotificationsGroup 之命名空間中所有通知中樞的資訊。

範例 2

取得通知中樞的相關信息。 ( 自動產生 )

Get-AzNotificationHub -Namespace 'ContosoNamespace' -NotificationHub 'ContosoInternalHub' -ResourceGroup 'ContosoNotificationsGroup'

參數

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Namespace

指定指派通知中樞的命名空間。 命名空間提供分組和分類通知中樞的方式。

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-NotificationHub

指定這個 Cmdlet 取得的通知中樞名稱。 通知中樞可用來將推播通知傳送至多個用戶端,而不論這些用戶端所使用的平台為何。

Type:String
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroup

指定指派通知中樞的資源群組。 資源群組會以協助清查管理和 Azure 系統管理的方式,組織命名空間、通知中樞和授權規則等專案。

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

輸入

String

輸出

NotificationHubAttributes