Remove-AzEventHub
Removes the specified Event Hub.
Syntax
EventhubDefaultSet (Standard)
Remove-AzEventHub
[-ResourceGroupName] <String>
[-Namespace] <String>
[-Name] <String>
[-PassThru]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzEventHub
[-InputObject] <PSEventHubAttributes>
[-PassThru]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
EventhubResourceIdParameterSet
Remove-AzEventHub
[-ResourceId] <String>
[-PassThru]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-AzEventHub cmdlet removes and deletes the specified Event Hub from the given namespace.
Exempel
Example 1
PS C:\> Remove-AzEventHub -ResourceGroupName MyResourceGroupName -Namespace MyNamespaceName -Name MyEventHubName
Removes the Event Hub `MyEventHubName`.
PS C:\> $inputobject = Get-AzEventHub <params>
PS C:\> Remove-AzEventHub -InputObject $inputobject
PS C:\> Get-AzEventHub <params> | Remove-AzEventHub
Example 3.1 - ResourceId - Using Variable:
PS C:\> $resourceid = Get-AzEventHub <params>
PS C:\> Remove-AzEventHub -ResourceId $resourceid.Id
Example 3.1 - ResourceId - Using string:
PS C:\> Remove-AzEventHub -ResourceId "/subscriptions/xxxx-xxxxx-xxxxxx-xxxxxx/resourceGroups/ResourceGroupName/providers/Microsoft.EventHub/namespaces/NamespaceName/eventhubs/EventHubName"
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
Eventhub Object
EventhubInputObjectSet
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 Name
Parameteregenskaper
Typ: String
Standardvärde: None
Stöder jokertecken: False
DontShow: False
Alias: EventHubName
Parameteruppsättningar
EventhubDefaultSet
Position: 2
Obligatorisk: True
Värde från pipeline: False
Värde från pipeline efter egenskapsnamn: True
Värde från återstående argument: False
-Namespace
Namespace Name
Parameteregenskaper
Typ: String
Standardvärde: None
Stöder jokertecken: False
DontShow: False
Alias: NamespaceName
Parameteruppsättningar
EventhubDefaultSet
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
EventhubDefaultSet
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
Eventhub Resource Id
Parameteregenskaper
Typ: String
Standardvärde: None
Stöder jokertecken: False
DontShow: False
Parameteruppsättningar
EventhubResourceIdParameterSet
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 .
Utdata