Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Create Azure IoT Hub for Mongoose IoT
# Get the latest AzureAD/RM PSM's
Install-Module AzureRM
# Import the AuzreAD/RM PSM's
Import-Module AzureRM
# Prompt for AuthN and Login
# Get the Subscription
Get-AzureRMSubscription | Get-AzureRMSubscription -SubscriptionName $_.SubscriptionName
# Get IoT Hub Geos
$IoTHubLocations = ((Get-AzureRmResourceProvider -ProviderNamespace Microsoft.Devices).ResourceTypes | Where-Object ResourceTypeName -eq IoTHubs).Locations
$IoTHubLocations | fl
$location = "East US"
# Create New RG
$RGName = "MyMongooseIoTHub"
$RG = New-AzureRmResourceGroup -Name $RGName -Location $location
#$RG = Get-AzureRmResourceGroup -Name $RGName
# Create IoT Hub
$IoTHubName = "MongooseIoTHub"
New-AzureRmIotHub -ResourceGroupName $RGName -Name $IoTHubName -SkuName F1 -Units 1 -Location $location
$IoTHub = Get-AzureRmIotHub -Name $IoTHubName -ResourceGroupName $RGName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.