The code used in this chapter is available at https://github.com/PacktPublishing/Powershell-Core-6.2-Cookbook/tree/master/Chapter09.
In order to go through the Azure Stack examples, you need a physical or virtual machine that complies with the requirements outlined here: https://docs.microsoft.com/en-us/azure/azure-stack/asdk/asdk-deploy-considerations.