< Back

Set-AzureRmNotificationHubsNamespace

Tue Jan 29, 2019 9:59 pm

NAME Set-AzureRmNotificationHubsNamespace



SYNOPSIS

Sets property values for a notification hub namespace.





SYNTAX

Set-AzureRmNotificationHubsNamespace [-ResourceGroup] <String> [-Namespace] <String> [-Location] <String> [[-State] {Unknown | Active | Disabled}]

[[-Critical] <Boolean>] [[-SkuTier] <String>] [[-Tag] <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-Force] [-Confirm] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

The Set-AzureRmNotificationHubsNamespace cmdlet sets the property values of an existing notification hub namespace.



Namespaces are logical containers that help you organize and manage your notification hubs. You must have at least one notification hub namespace.

Additionally, all notification hubs must have an assigned namespace.



This cmdlet is primarily used to enable and disable a namespace. When a namespace is disabled, users cannot connect to any of the notification

hubs in the namespace, nor can administrators use those hubs to send push notifications. To re-enable a disabled namespace, use this cmdlet to set

the State property of the namespace to Active.



You can also use this cmdlet to tag a namespace as critical. This prevents the namespace from being deleted. To remove a critical namespace you

must first remove the Critical tag.





PARAMETERS

-Critical <Boolean>

Indicates whether the namespace is a critical namespace. Critical namespaces cannot be deleted. To delete a critical namespace, you must set

the value of this property to False in order to mark the namespace as non-critical.



Required? false

Position? 4

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-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



-Force [<SwitchParameter>]

Do not ask for confirmation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Location <String>

Specifies the display name of the datacenter that hosts the namespace. Although you can set this parameter to any valid Azure location, for

optimal performance you should use a datacenter located near the majority of your users.



To get an up-to-date list of Azure locations run the following command:



`Get-AzureLocation | Select-Object DisplayName`



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Namespace <String>

Specifies the namespace that this cmdlet modifies.



Namespaces provide a way to group and categorize notification hubs.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroup <String>

Specifies the resource group to which the namespace is assigned.



Resource groups organize items such as namespaces, notification hubs, and authorization rules in ways that help simply inventory management

and Azure administration.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SkuTier <String>

Sku tier of the namespace



Required? false

Position? 4

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-State <NamespaceState>

Specifies the current state of the namespace. The acceptable values for this parameter are: Active and Disabled.



Required? false

Position? 3

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Tag <Hashtable>

Specifies name-value pairs that can be used to categorize and organize Azure items. Tags function similar to keywords, and operate across a

deployment. For example, if you search for all items with the tag Department:IT the search will return all the Azure items that have that tag,

regardless of such things as item type, location, or resource group.



An individual tag consists of two parts: the Name and (optionally) the Value . For example, in Department:IT, the tag name is Department and

the tag value is IT. To add a tag, use hash table syntax similar to this, which creates the tag CalendarYear:2016:



-Tags @{Name="CalendarYear";Value="2016"}



To add multiple tags in the same command, separate the individual tags by using commas:



-Tag @{Name="CalendarYear";Value="2016"}, @{Name="FiscalYear";Value="2017"}



Required? false

Position? 5

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.NamespaceAttributes







NOTES









Example 1: Disable a namespace



PS C:\\>Set-AzureRmNotificationHubsNamespace -Namespace "ContosoPartners" -Location "West US" -ResourceGroup "ContosoNotificationsGroup" -State

"Disabled"



This command disables the namespace named ContosoPartners located in the West US datacenter and assigned to the ContosoNotificationsGroup resource

group.





Example 2: Enable a namespace



PS C:\\>Set-AzureRmNotificationHubsNamespace -Namespace "ContosoPartners" -Location "West US" -ResourceGroup "ContosoNotificationsGroup" -State

"Active"



This command enables the namespace named ContosoPartners located in the West US datacenter and assigned to the ContosoNotificationsGroup resource

group.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... snamespace

Get-AzureRmNotificationHubsNamespace

New-AzureRmNotificationHubsNamespace

Remove-AzureRmNotificationHubsNamespace