Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Azure IoT Development Cookbook

You're reading from   Azure IoT Development Cookbook Develop and manage robust IoT solutions

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781787283008
Length 254 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Yatish Patil Yatish Patil
Author Profile Icon Yatish Patil
Yatish Patil
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Getting Started with the Azure IoT Platform 2. Introducing Device Management FREE CHAPTER 3. IoT Hub Messaging and Commands 4. Azure IoT Communication Protocols 5. Azure IoT Hub Security and Best Practices 6. IoT Suite and Pre-Configured Solutions 7. Azure IoT Analytics 8. Using Real Devices to Connect and Implement Azure IoT Hub 9. Managing the Azure IoT Hub

Creating Azure IoT Hub from the Command Prompt

How to do it...

In this section, let's look at creating an IoT Hub using CLI:

  1. Open the Command Prompt within administrator mode.
  2. Use the login command in Command Prompt:
azure login
  1. It will ask you to login using a web browser with the link displayed in the Command Prompt:
Login command
  1. The web link will validate the code generated in Command Prompt:
Login authenticate through web
  1. Once you successfully log in, it will show a message on the browser and you can go back to the Command Prompt for your work:
Login validated successfully
  1. Now, select the account with which you want to work and create the IoT Hub:
azure account set “Visual Studio Enterprise”
Select Azure account
  1. Now, we need to create a resource group, which this IoT Hub will be a part of:
azure group create -n MyBookIoTHub -l westus
  1. We use the following command to create a new IoT Hub using the Command Prompt:
azure iothub create -g MyBookIoTHub -n MyBookIoTHub -l westus -k s1 -u 1

In the preceding create IoT Hub command, the parameters are resource group, IoT Hub name, location, instance size, and unit.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime