I am thoroughly confused by the idea of using powershell through Azure locally on a machine or using through Azure Cloud. I'm not clear on the points Cherokee is making. Why would i want to use something locally? Doesn't that defeat the flexibility of the cloud? Does a local install communicate back to the cloud?
Azure Powershell used locally or through the cloud
I'm not sure what episode you are referring to, so I'm not sure what points Cherokee was making. But I can help with info about using PowerShell with Azure.
When you use PowerShell to work with Azure, you can run PowerShell locally on your machine or you can run PowerShell in a Cloud Shell. There are advantages and disadvantages to each. The choice is completely up to you, they both accomplish the same thing, manage Azure resources with PowerShell.
I personally like to use PowerShell on my local machine. When I launch PowerShell, I need to connect it to my Azure subscription. I run Connect-AzAccount and authenticate with my Azure account. Now PowerShell is connected to Azure, and I can run commands, like Get-AzResourceGroup or New-AzVM. I like this method because I have my local PowerShell configured the way I like it. I use Windows Terminal, have my font and code highlighting set, etc. I also have easy access to local resources. The disadvantages of using PowerShell locally are
- You have to authenticate before you can run commands. If you are writing scripts, make sure your script included authentication commands or connect your shell before running the script.
- You have to keep PowerShell, and the modules it uses, up to date.
Using PowerShell in the cloud means launching an Azure Cloud Shell. You can launch a Cloud Shell in two ways. You can first connect to portal.azure.com and click the icon to open a cloud shell, or you can use a direct link by navigating to shell.azure.com. You authenticate when you connect to the portal, so if you launch a cloud shell from the portal, you are already authenticated. You can launch the cloud shell and begin issuing commands. If you use the direct link, it will prompt for authentication, and open a shell in a browser tab. Then you can issue commands. The advantage of using these methods, is nothing is installed locally, all you need is a browser and an internet connection. Maybe you are on a machine that doesn't have PowerShell installed (macOS or Linux). Maybe the machine you are at doesn't have the right modules, and you don't have administrative access to install them. You are also going to be using the latest version, every time. Microsoft will keep the cloud shell current, nothing for you to update. One disadvantage is you need to upload scripts in order to run them.
So the choice is yours. Whichever one you want to use. I use PowerShell locally, but if I'm already connected to the portal, and just want to run a quick command I use Cloud Shell to launch a PowerShell session.
Yes, both methods communicate with Azure. You are either connecting to Azure with PowerShell (when installed locally) or a browser (when launching cloud shell) either way you need internet access.
Hope this helps!
**if the post above has answered the question, please mark the topic as solved.