Author: jbmurphy
-
Running eclipse-mosquitto in an Azure IoT Edge Module
I was looking to run a MQTT broker on an IoT edge device, allowing devices to communicate locally with each other. The most important thing is to modify the “Container Create Options” so that the container’s port can be seen on the local network. Also I want to use the no auth mosquitto config (it…
-
How to find the Raspberry Pi model
Note to self: How to find the Raspberry Pi Model :
-
Azure Functions (PowerShell) : Find the current FunctionApp and Function names
I was writing an Azure Function in PowerShell. I wanted to know the name of the current FunctionApp and the current Function. Since it was a timer triggered function, I couldn’t pass the names. It took me a while to to figure this out. There may be other ways, but this only way I could…
-
Quickly find that new Raspberry Pi’s address
Saw this the other day, and I wanted to post it, so that I can remember it. How to find a Raspberry Pi’s DHCP address:
-
Quick 1 liner to download your Azure Billing Statements
Simple and quick – I had never done it before. I was working on a different script, but I realized that I have never downloaded my billing statements from azure. Simple 1 liner to download them: Hope that helps someone!
-

PowerShell to get the cost of a VM per day
I wanted to get the cost of a VM each day. I came up with the following code. Just the VM cost, not the ingress (DataTrIn) or egress (DataTrOut). I hope it helps someone!
-

PowerShell: Remove old Az modules
I recently ran a Get-Modules -ListAvaiable and I saw a lot of older versions: I wanted to remove all versions except the most recent. Here is my script: Hope that helps someone.
-

AKS: you update-credentials and can’t pull from your ACR?
Ran into this one the other day. Suspect it may be an issue for some people as their Service Principle secrets are going to expire soon (default is 1 year). I used the following method below to build an AKS cluster: Standard Stuff. The trick is, when you need to update you SP credentials, how…
-
Using Azure Resource Graph for your inventory script
In the past I have always run Get-AzureRmResourceGroup, and then looped through all the resources groups and the VMs inside of them. This can be slow. So I put together this script to leverage Azure Resource Graph for your inventory. I hope this helps some one: This pulls back everything and then you can pull…
-
Add a Document to CosmosDB via the REST API using PowerShell
There are a lot of examples out there on how to POST a document to Cosmos DB, but they weren’t working for me. I kept getting a 400 Bad Request. After far to long, I finally got it to work. I need the “x-ms-documentdb-partitionkey” header to make it work. Code for anyone who needs it…
