I have an Azure IoT Hub with a bunch of devices that our team's E2E tests generate. I want to purge the Hub every once in a while using the Azure CLI.
I am running the Azure CLI locally on Powershell, using the Azure IoT extension.
From my research, there is a way to get a list of all the devices in a hub printed to the console in JSON format:
az iot hub device-identity list --hub-name "test-hub"
And there is a way to delete a single device-identity:
az iot hub device-identity delete --device-id "test-id" --hub-name "test-hub"
How can I delete all the devices in the hub using the cli interfaces and some powershell commands?
az iot hub device-identity list --hub-name "test-hub"
? – Rumsey