This repo shows how to use the Azure CLI in a PowerShell function. Leveraging GitHub actions, it provides a working end-to-end example of the steps required to get the Azure CLI working inside a PowerShell function.
The GitHub Action Workflow orchestrates the steps inside an empty Azure environment.