Dela via


Remove-AzEventHubNamespace

Removes the specified Event Hubs namespace.

Syntax

NamespaceParameterSet (Standard)

Remove-AzEventHubNamespace
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

NamespaceInputObjectSet

Remove-AzEventHubNamespace
    [-InputObject] <PSNamespaceAttributes>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

NamespaceResourceIdParameterSet

Remove-AzEventHubNamespace
    [-ResourceId] <String>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-AzEventHubNamespace cmdlet removes and deletes the specified Event Hubs namespace.

Exempel

Example 1

PS C:\> Remove-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -Name MyNamespaceName

Removes the Event Hubs namespace `MyNamespaceName` in resource group `MyResourceGroupName`.

Example 2.1 - InputObject - Using Variable:

PS C:\> $inputObject = Get-AzEventHubNamespace <params>
PS C:\> Remove-AzEventHubNamespace -InputObject $inputObject

Example 2.1 - InputObject - Using Piping:

PS C:\> Get-AzEventHubNamespace <params> | Remove-AzEventHubNamespace

Example 3.1 - ResourceId - Using Variable

PS C:\> $resourceid = Get-AzEventHubNamespace <params>
PS C:\> Remove-AzEventHubNamespace -ResourceId $resourceid.Id

Example 3.2 - ResourceId - Using Piping:

PS C:\> Get-AzResource -ResourceType Microsoft.EventHub/Namespaces | Remove-AzEventHubNamespace

Example 3.3 - ResourceId - Using String:

PS C:\> Remove-AzEventHubNamespace -ResourceId "/subscriptions/xxx-xxxxx-xxxxxx-xxxxxx/resourceGroups/ResourceGroupName/providers/Microsoft.EventHub/namespaces/NamespaceName"

Parametrar

-AsJob

Run cmdlet in the background

Parameteregenskaper

Typ:SwitchParameter
Standardvärde:None
Stöder jokertecken:False
DontShow:False

Parameteruppsättningar

(All)
Position:Named
Obligatorisk:False
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameteregenskaper

Typ:SwitchParameter
Standardvärde:None
Stöder jokertecken:False
DontShow:False
Alias:cf

Parameteruppsättningar

(All)
Position:Named
Obligatorisk:False
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameteregenskaper

Typ:IAzureContextContainer
Standardvärde:None
Stöder jokertecken:False
DontShow:False
Alias:AzContext, AzureRmContext, AzureCredential

Parameteruppsättningar

(All)
Position:Named
Obligatorisk:False
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

-InputObject

EventHubs Namespace Object

Parameteregenskaper

Typ:PSNamespaceAttributes
Standardvärde:None
Stöder jokertecken:False
DontShow:False

Parameteruppsättningar

NamespaceInputObjectSet
Position:0
Obligatorisk:True
Värde från pipeline:True
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

-Name

EventHub Namespace Name

Parameteregenskaper

Typ:String
Standardvärde:None
Stöder jokertecken:False
DontShow:False
Alias:NamespaceName

Parameteruppsättningar

NamespaceParameterSet
Position:1
Obligatorisk:True
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:True
Värde från återstående argument:False

-PassThru

Specifying this will return true if the command was successful.

Parameteregenskaper

Typ:SwitchParameter
Standardvärde:None
Stöder jokertecken:False
DontShow:False

Parameteruppsättningar

(All)
Position:Named
Obligatorisk:False
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

-ResourceGroupName

Resource Group Name

Parameteregenskaper

Typ:String
Standardvärde:None
Stöder jokertecken:False
DontShow:False

Parameteruppsättningar

NamespaceParameterSet
Position:0
Obligatorisk:True
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:True
Värde från återstående argument:False

-ResourceId

EventHubs Namespace Resource Id

Parameteregenskaper

Typ:String
Standardvärde:None
Stöder jokertecken:False
DontShow:False

Parameteruppsättningar

NamespaceResourceIdParameterSet
Position:0
Obligatorisk:True
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:True
Värde från återstående argument:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameteregenskaper

Typ:SwitchParameter
Standardvärde:None
Stöder jokertecken:False
DontShow:False
Alias:wi

Parameteruppsättningar

(All)
Position:Named
Obligatorisk:False
Värde från pipeline:False
Värde från pipeline efter egenskapsnamn:False
Värde från återstående argument:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Indata

String

PSNamespaceAttributes

Utdata

Void