你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Remove-AzNotificationHub
Removes an existing notification hub.
Syntax
Remove-AzNotificationHub
[-ResourceGroup] <String>
[-Namespace] <String>
[-NotificationHub] <String>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-AzNotificationHub cmdlet removes an existing notification hub. Notification hubs are used to send push notifications to multiple clients regardless of the platform used by those clients. Platforms include, but are not limited to: iOS, Android, Windows Phone 8, and Windows Store. Notification hubs are roughly equivalent to individual apps: each of your apps will typically have its own notification hub. You can remove an existing notification hub by using the Remove-AzNotificationHub cmdlet. After a hub has been removed you can no longer use that hub to send push notifications to users.
Examples
Example 1: Remove a notification hub
Remove-AzNotificationHub -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup" -NotificationHub "ContosoInternalHub"
This command removes the notification hub named ContosoInternalHub. In order to remove the hub, you must specify the namespace where the hub is located as well as the resource group the hub is assigned to.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Do not ask for confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Namespace
Specifies the namespace to which the notification hub is assigned. Namespaces provide a way to group and categorize notification hubs.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NotificationHub
Specifies the notification hub to be removed. Notification hubs are used to send push notifications to multiple clients regardless of the platform used by those clients.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroup
Specifies the resource group to which the notification hub is assigned. Resource groups organize items such as namespaces, notification hubs, and authorization rules in ways that help simply inventory management and Azure administration.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |