< Back
New-AzureRmNotificationHub
Post
NAME New-AzureRmNotificationHub
SYNOPSIS
Creates a notification hub.
SYNTAX
New-AzureRmNotificationHub [-ResourceGroup] <String> [-Namespace] <String> [-InputFile] <String> [-DefaultProfile <IAzureContextContainer>]
[-Confirm] [-WhatIf] [<CommonParameters>]
New-AzureRmNotificationHub [-ResourceGroup] <String> [-Namespace] <String> [-NotificationHubObj] <NotificationHubAttributes> [-DefaultProfile
<IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmNotificationHub cmdlet creates a notification hub. Notification hubs are used to send push notifications to multiple clients
regardless of the platform used by those clients. Notification hubs are roughly equivalent to individual apps: each of your apps will typically
have its own notification hub.
The New-AzureRmNotificationHub cmdlet provides two ways to create a new notification hub. You can create an instance of the
NotificationHubAttributes object and then configure that object. You can then copy those property values to your new hub by through the
NotificationHubObj parameter.
Alternatively, you can create a JSON (JavaScript Object Notation) file containing the relevant configuration values and then apply those values
by using the InputFile parameter.
When used in conjunction with the New-AzureRmNotificationHub cmdlet, the preceding JSON sample creates a notification hub named
ContosoNotificationHub located on the West US datacenter.
PARAMETERS
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InputFile <String>
Specifies the path to a JSON file containing configuration values for the new notification hub.
Required? true
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Namespace <String>
Specifies the namespace to which the notification hub will be assigned.
Namespaces provide a way to group and categorize notification hubs. Notification hubs must be assigned to an existing namespace. The
New-AzureRmNotificationHub cmdlet cannot create a new namespace.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-NotificationHubObj <NotificationHubAttributes>
Specifies the NotificationHubAttributes object that contains configuration information for the new hub.
Required? true
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroup <String>
Specifies the resource group to which the notification hub will be assigned. Resource groups organize items such as namespaces, notification
hubs, and authorization rules in ways that help simply inventory management and Azure administration.
You must use an existing resource group. The New-AzureRmNotificationHub cmdlet cannot create a new resource group.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.NotificationHubs.Models.NotificationHubAttributes
NOTES
Example 1: Create a notification hub
PS C:\\>New-AzureRmNotificationHub -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup" -InputFile
"C:\\Configurations\\InternalHub.json"
This command creates a notification hub in the namespace ContosoNamespace. The new hub will be assigned to the ContosoNotificationsGroup. You do
not need to specify a name or any other configuration information for the hub; that information will be taken from the input file
C:\\Configurations\\InternalHub.json.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... icationhub
Get-AzureRmNotificationHub
Remove-AzureRmNotificationHub
Set-AzureRmNotificationHubAuthorizationRules
SYNOPSIS
Creates a notification hub.
SYNTAX
New-AzureRmNotificationHub [-ResourceGroup] <String> [-Namespace] <String> [-InputFile] <String> [-DefaultProfile <IAzureContextContainer>]
[-Confirm] [-WhatIf] [<CommonParameters>]
New-AzureRmNotificationHub [-ResourceGroup] <String> [-Namespace] <String> [-NotificationHubObj] <NotificationHubAttributes> [-DefaultProfile
<IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmNotificationHub cmdlet creates a notification hub. Notification hubs are used to send push notifications to multiple clients
regardless of the platform used by those clients. Notification hubs are roughly equivalent to individual apps: each of your apps will typically
have its own notification hub.
The New-AzureRmNotificationHub cmdlet provides two ways to create a new notification hub. You can create an instance of the
NotificationHubAttributes object and then configure that object. You can then copy those property values to your new hub by through the
NotificationHubObj parameter.
Alternatively, you can create a JSON (JavaScript Object Notation) file containing the relevant configuration values and then apply those values
by using the InputFile parameter.
When used in conjunction with the New-AzureRmNotificationHub cmdlet, the preceding JSON sample creates a notification hub named
ContosoNotificationHub located on the West US datacenter.
PARAMETERS
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InputFile <String>
Specifies the path to a JSON file containing configuration values for the new notification hub.
Required? true
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Namespace <String>
Specifies the namespace to which the notification hub will be assigned.
Namespaces provide a way to group and categorize notification hubs. Notification hubs must be assigned to an existing namespace. The
New-AzureRmNotificationHub cmdlet cannot create a new namespace.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-NotificationHubObj <NotificationHubAttributes>
Specifies the NotificationHubAttributes object that contains configuration information for the new hub.
Required? true
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroup <String>
Specifies the resource group to which the notification hub will be assigned. Resource groups organize items such as namespaces, notification
hubs, and authorization rules in ways that help simply inventory management and Azure administration.
You must use an existing resource group. The New-AzureRmNotificationHub cmdlet cannot create a new resource group.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.NotificationHubs.Models.NotificationHubAttributes
NOTES
Example 1: Create a notification hub
PS C:\\>New-AzureRmNotificationHub -Namespace "ContosoNamespace" -ResourceGroup "ContosoNotificationsGroup" -InputFile
"C:\\Configurations\\InternalHub.json"
This command creates a notification hub in the namespace ContosoNamespace. The new hub will be assigned to the ContosoNotificationsGroup. You do
not need to specify a name or any other configuration information for the hub; that information will be taken from the input file
C:\\Configurations\\InternalHub.json.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... icationhub
Get-AzureRmNotificationHub
Remove-AzureRmNotificationHub
Set-AzureRmNotificationHubAuthorizationRules