Forum Discussion
.NET Core Quicksstarts Done quickly with one PowerShell script start to finish.
I have a long time felt that the .NET Core C# https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-dotnet for the Azure IoT Hub SDK could be simpler for a newbie. To that end I created the UWP apps https://github.com/djaus2/AziothubDeviceStreaming and then https://github.com/djaus2/Azure.IoTHub.Toolbox as available on GitHub and in https://www.microsoft.com/en-au/p/azureiothubtoolbox/9pmcf9clttwz?activetab=pivot:overviewtab. These encapsulated the Quickstart functionality and orchestrated IoT Hub creation. This latest salvo into this area can make it even simpler!
You run one PowerShell script with which you can create an IoT Hub, get all of the connection strings, save them to environment variables, create PowerShell and Bash scripts to re-set those variables, get the required targeted .NET Core SK binary including expansion of the download amongst other things. Included is a copy of the Quickstarts modified so that all apps get the required connection strings from the environment variables. A couple of variants to the apps have been added. More coming, especially with RPi hardware use.
The PowerShell script and its underlying scripts is available on GitHub as https://github.com/djaus2/az-iothub-ps . It is a menu driven UI, with a bit of color included!. I have written as series of blogs on .NET Core, especially on the RaspberryPi (IoT-Core and Raspian) and upon running the Quickstarts there via the PowerShell script on my blog at http://www.sportronics.com.au .Here are the specific links:
(Note: In reverse order)
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-_One_more_way_of_doing_this_-_How_to-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-One_more_way_of_doing_this-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-_Using_the_PS_Script_to_run_Quickstarts_on_RPi_(Raspian)_.html
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-_Using_the_PS_Script_to_run_Quickstarts_on_RPi_(IoT-Core)_-_Simpler-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-Using_PS_Script_to_run_Quickstarts_on_RPi_(IoT-Core)-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-Az-IoTHub-PS_The_IOT_Hub_Quickstart_Apps-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-Use_the_PS_Script_to_set_up_.NET_Core-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-Fast_tracking_IoT_Hub_Creation_with_PS-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-On_Windows_Subsystem_for_Linux-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/_.NET_Core_on_IoT-Getting_started_on__Raspbian-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/_.NET_Core_on_IoT-Getting_started_on_Win_10_IoT-Core-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-Options_for_the_RPi-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-Some_key_facts-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/dnetcore-on-IoT-Apps-dotnetcoreiot.html
- http://www.sportronics.com.au/dotnetcoreiot/dnetcore-on-IoT-dotnetcoreiot.html
Extra:http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-Using_the_az-iothub-ps_script-dotnetcoreiot.html
Also a presentation on http://www.sportronics.com.au/media/dnc.pptx
3 Replies
- David JonesBrass Contributor
The script now has a "one touch option". You now can do it all with one command.
http://www.sportronics.com.au/dotnetcoreiot/.NET_Core_on_IoT-You_can_now_fully_automate_Group-Hub-Device_creation-dotnetcoreiot.htm
- David JonesBrass Contributor
It just got even easier! Just enter
get-iothub groupname,hubname,device,name
And your away! http://www.sportronics.com.au/dotnetcoreiot/_.NET_Core_on_IoT-It's_now_even_easier._Enter_names_on_command_line.-dotnetcoreiot.html
Usual setup as per blog articles.
- David JonesBrass Contributor
And
get-iothub groupname,hubname,device,name 5
will completely autorun to completion once you select a couple of things, with only 5 sec pauses instead of the press-any-key-to-continue messages.