During my recent studies on the cloud realm, I've been experimenting with Azure PowerShell module that allows you to manage your Azure subscription remotely via an encrypted remote session. It's pretty handy when you want to automate tasks and don't want to have to go to Azure portal and click through a dozen of screens to get it done.
I've put up the following PowerShell script as my first prototype for Azure Powershell automation that would create a VM on Azure using a JSON Template.
It will validate if there's an active Azure Subscription connection for the current profile, perform it if not. Also validate if a valid URI was provided for the template.
There's a some room for improvement on logging and additional features, but I just wanted to make it quick and simple to exemplify it's usage.
Feel free to take a look and to comment it if you like!
Cheers!
Github source:
https://github.com/diogocatossi/Powershell/blob/master/AzurePowershell-CreateSimpleVMUsingTemplate.ps1
Dreamer, Self-learner, IT Senior Workplace Systems Engineer, Traveler; Someone willing to share knowledge and lessons learned throughout life. Posts that would be useful for IT professionals out there when working with Windows OS, SCCM, System Center Orchestrator, PowerShell and more.
Photos: Public Photos
Wednesday, June 10, 2020
Subscribe to:
Posts (Atom)
Powershell - Azure - Create VM using templates
During my recent studies on the cloud realm, I've been experimenting with Azure PowerShell module that allows you to manage your Azure s...
-
For several years I've been working with Windows Server and desktop infrastructure (dating back from Windows NT 4.0) and Active Directo...
-
During my recent studies on the cloud realm, I've been experimenting with Azure PowerShell module that allows you to manage your Azure s...