You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use Azure PowerShell cmdlets to create and manage Azure IoT hubs. This tutorial shows you how to create an IoT hub with PowerShell.
20
20
21
-
To complete this how-to, you need an Azure subscription. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
If you are using the Cloud Shell, you are already logged in to your subscription. If you are running PowerShell locally instead, enter the following command to sign in to your Azure subscription:
28
+
If you're using the Cloud Shell, you're already logged in to your subscription. If you're running PowerShell locally instead, enter the following command to sign in to your Azure subscription:
30
29
31
30
```powershell
32
31
# Log into Azure account.
@@ -59,42 +58,42 @@ The name of the IoT hub must be globally unique.
You can list all the IoT hubs in your subscription using the [Get-AzIotHub](/powershell/module/az.IotHub/Get-azIotHub) command:
61
+
To list all the IoT hubs in your subscription, use the [Get-AzIotHub](/powershell/module/az.IotHub/Get-azIotHub) command.
62
+
63
+
This example shows the S1 Standard IoT Hub you created in the previous step.
63
64
64
65
```azurepowershell-interactive
65
66
Get-AzIotHub
66
67
```
67
68
68
-
This example shows the S1 Standard IoT Hub you created in the previous step.
69
-
70
-
You can delete the IoT hub using the [Remove-AzIotHub](/powershell/module/az.iothub/remove-aziothub) command:
69
+
To delete the IoT hub, use the [Remove-AzIotHub](/powershell/module/az.iothub/remove-aziothub) command.
71
70
72
71
```azurepowershell-interactive
73
72
Remove-AzIotHub `
74
73
-ResourceGroupName MyIoTRG1 `
75
74
-Name MyTestIoTHub
76
75
```
77
76
78
-
Alternatively, you can remove a resource group and all the resources it contains using the [Remove-AzResourceGroup](/powershell/module/az.Resources/Remove-azResourceGroup) command:
77
+
Alternatively, to remove a resource group and all the resources it contains, use the [Remove-AzResourceGroup](/powershell/module/az.Resources/Remove-azResourceGroup) command:
79
78
80
79
```azurepowershell-interactive
81
80
Remove-AzResourceGroup -Name MyIoTRG1
82
81
```
83
82
84
83
## Next steps
85
84
86
-
Now you have deployed an IoT hub using a PowerShell cmdlet, if you want to explore further, check out the following articles:
85
+
Now that you've deployed an IoT hub using a PowerShell cmdlet, explore more articles:
87
86
88
87
*[PowerShell cmdlets for working with your IoT hub](/powershell/module/az.iothub/).
0 commit comments