Just updated az-iothub-ps on GitHub: Lots of new features


Just released version 3.0 of djaus2/az-iothub-ps  on GitHub. That is is a PowerShell suite that I've been working on for sometime. My Holy Grail is to be able to be setup an run apps with Azure IoT Hub with one touch; a single command line that does everything!  No pages and pages of do-this then copy-that get-the-result paste-it-here .. etc! :sad: I did have an earlier attempt at that with a UWP app which did orchestrate things but not completely.

az-iothub-ps is a vast suite of PowerShell functions, bound together in one command get-iothub.

This can be run in a menu where there is a submenu for each of Groups, Hubs, Device and DPS from which you can list, select, create and delete these entities. There are other related menus as well. 

You can also run get-iothub from the command line such as:


.\get=iothub  GroupName,HubName,DeviceName   5
.\get=iothub  GroupName,HubName,DeviceName,DPSName   5


The first version will set up up for running the Azure IoT Hub SDK Quickstarts, including the required connection metainformation. Those Quickstarts are contained in the repository so that running them and supplying the metainformation is seamless. Other variants of the Quickstarts such as a Motor H Bridge are included.

With the second version, the Hub and DPS are linked automatically and you end up with a app_manifest.json file suitable for the AureIoT sample app for Azure Sphere. The get-iothub command has a submenu for Azure Sphere including a majority of the AzSphere commands (and .. the AzSphere command prompt as a PowerShell!).

Latest: As part of the second version of the command line, the tools now does the Tenant Verification including certificate generation, uploading, downloading etc without needing to go the Azure Portal.

This is all in the Main branch of the repository. This dId have some IoT Central capabilities but these have been hived off to the IoT-Central branch of the repository as the Azure CLI and AzSphere APIs are not as well developed for IoT Central as they are for DPS. This branch is a work in progress whereas the Main branch HAS reached the Holy Grail!:smile:

2 Replies
What is the 5 in the command lines? Well may you ask: When running in the auto mode, it wouldn't make sense if at every user controlled pause such as "Press any key to continue" if it did wait. For these it only pauses for the requested seconds, 5 in this case. For yes/no pauses, they pause for 5vseconds as well then take the default response. That way the script can run to completion without user intervention once a few options are selected at the start. But tge user can get time to see what has happened.