Tag: Virtual Machine

Just another User's blog Site

Powershell script to list the .Net core version in an Azure Virtual Machine using Invoke-AzVmRunCommand

Tasked with finding a script to list the installed .NET Core versions in an Azure VM within a locked down environment, we tried multitude option and ended up with the below provided script which helps to run a script using the Invoke-AzVMRunCommand. This script uses Azure PowerShell 7.3.1 or later and requires latest version of…
Read more

Restore Virtual Machine from Blob Snapshot in Azure (Resource Manager)

Overview Script will help you to restore a virtual machine from the existing blob snapshots. Although some familiarity with the Azure Portal would be beneficial, however, for the benefit of everyone, a step by step guide in this document is provided. Script workflow: Script executes Reads the input file which is a comma separated .CSV…
Read more

Create a VM from existing VHD file

A tricky task with creating an Azure ARM Virtual machine specially from an existing VHD.   We had immense trouble getting this right for a project, until we managed to find the right script to be used for the purpose. There are 2 scenarios in which you will create a Virtual Machine from a VHD…
Read more

PowerShell to create and assign Tags to Azure ARM Virtual Machines

A script we have developed for creation of the tags for azure VM.   We use an input file to update the tags and as a test, I had done it with upto 7 tags, however, you can have a maximum of 15 tags assigned to the resources in Azure. This script however, is used to…
Read more

Powershell script to deploy virtual machine with multiple vNIC in Azure ARM

We had a requirement from one of the teams to deploy a virtual machine with multiple NIC associated with a single Virtual Machine.  The Azure portal does not provide any option to either associate a NIC ( Network Interface Card) to a Virtual Machine nor does it allow us to associate or create a Virtual…
Read more

Script to Delete Azure ARM Virtual Machine

We had a request to create a script which will take care of deleting a Virtual Machine from Azure subscription and perform the clean up of all the associated objects as a deleting the virtual machine from the azure portal will remove the VM object alone and does not delete the disks, vNICs, etc. We…
Read more