PowerShell (20)

Automate Configuration Backups

While there are dedicated solutions that hook into network appliances to perform regularly backup of their state, namely their configurations, I devised a method using PowerShell and the built-in FTP service included with Internet Information Services (IIS) for Windows. The requirements are light and this…

Automate login for Azure PowerShell

Introduction To automate logging into an Azure tenancy for PowerShell scripts, you would need to utilize a service account that doesn't have Multi-factor Authentication (MFA) enabled; we all know there are weaknesses to this but there are ways to mitigate the risks, including: Even limiting access this…

Convert a Hyper-V Gen2 VM to Gen1

More often than not there wouldn't need to be a need to convert a Gen2 VM down to a Gen1 VM. The exceptions to this would be downgrading a version of Hyper-V from Windows Server 2012 to 2008 R2; the chances of this are quite…

Create a VM from PowerShell

While there is nothing wrong in using the Azure Portal to create VM’s, scripting via PowerShell provides some flexibility on some options which we will cover shortly. In the example, we will create a VM running Windows Server 2019 Datacenter UI using PowerShell, which requires…

Create a VM from a VHD

While there are many ways to migrate Hyper-V guests using Azure Migrate: Server Migration and Azure Site Recovery Provider, sometimes you might want to simply create an Azure VM using an existing VHD that you have uploaded to an Azure Storage account. If you have an existing managed…