Get-AzIotHub
Gets information about the IotHubs in a subscription.
Syntax
ListIotHubsByResourceGroup (Default)
Get-AzIotHub
[[-ResourceGroupName] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetIotHubByName
Get-AzIotHub
[-ResourceGroupName] <String>
[-Name] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Gets information about the IotHubs in a subscription. You can view all IotHub instances in a subscription, or filter your results by a resource group or a particular IotHub Name.
Examples
Example 1
Get-AzIotHub
Gets all the IotHubs in the subscription.
Example 2
Get-AzIotHub -ResourceGroupName "myresourcegroup"
Gets all the IotHubs in the subscription belonging to the resourcegroup named "myresourcegroup".
Example 3
Get-AzIotHub -ResourceGroupName "myresourcegroup" -Name "myiothub"
Gets information about the IotHub named "myiothub".
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Name of the IotHub
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GetIotHubByName
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-ResourceGroupName
Name of the ResourceGroup
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ListIotHubsByResourceGroup
Position: | 0 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | 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.