- Azure IoT Development Cookbook
- Yatish Patil
- 241字
- 2021-07-02 20:50:32
How to do it...
Let's look at this section to create IoT Hub using PowerShell:
- Open PowerShell in administrator mode:

Start PowerShell in administrator mode
- Once the PowerShell window is ready, log in to the Azure account using the command:
'Login-AzureRmAccount'

Login to Azure account
- If you have only one Azure subscription, then you are good to go.
- If you have multiple subscriptions, first we need to select the subscription which we need to work on.
- To view a list of all the available Azure subscription for your work use the following command:
'Get-AzureRMSubscription'
- Select the subscription with the command, (in my case it is Visual Studio Enterprise):
Select-AzureRMSubscription -SubscriptionName "{subscription name}"

Select the Azure account to work with
- Before we create the IoT Hub, we need to create a resource group, which this IoT Hub will be a part of.
- The command to create a new resource group is the following:
New-AzureRmResourceGroup -Name MyBookIoTHub -Location "West US"

Add new resource group
- We will create the IoT Hub using the following command:
New-AzureRmIotHub `
-ResourceGroupName MyBookIoTHub `
-Name MyBookIoTHub `
-SkuName S1 -Units 1 `
-Location "West US"

Azure IoT Hub created
- You can log in to the Azure portal and view the newly created IoT Hub:

IoT Hub list view
- To view the available IoT Hub in your account, use the command:
Get-AzureRmIotHub
- To delete an existing IoT Hub, use the following command:
Remove-AzureRmIotHub `
-ResourceGroupName MyBookIoTHub `
-Name MyBookIoTHub
推薦閱讀
- Extending Jenkins
- PHP 從入門到項(xiàng)目實(shí)踐(超值版)
- Swift 3 New Features
- 3D少兒游戲編程(原書第2版)
- 微信小程序開發(fā)解析
- Python機(jī)器學(xué)習(xí)算法與實(shí)戰(zhàn)
- Learning Vaadin 7(Second Edition)
- NoSQL數(shù)據(jù)庫原理
- 一本書講透Java線程:原理與實(shí)踐
- Natural Language Processing with Python Quick Start Guide
- Python計(jì)算機(jī)視覺和自然語言處理
- Python Programming for Arduino
- 軟件測(cè)試技術(shù)
- Monitoring Docker
- Professional JavaScript