Tag: PowerShell

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

Powershell to list Azure Server Backup Report from the Azure Recovery Service Vaults

I searched the internet for ideas and eventually wrote a PS script to retrieve the Azure Server backup details. I took the original script idea from the superuser site post https://superuser.com/questions/1716872/azure-server-backup-report and modified it to fit my needs, which worked well. The Script below is working fine and can be further modified to fit your…
Read more

Powershell script to export Azure Network Security Group rules in all of the Subscriptions

A script used to get the list of all Network Security Groups (NSGs) in all your Azure Subscriptions.Finally, it will export the report into a csv file in the location specified. Credits to Charbel Nemnom – https://charbelnemnom.com

PowerShell script to list all the extensions for a specific Azure ARM virtual machine

We have been looking for a script which will help us enumerate and list all the extensions for Azure ARM virtual machines and their properties, e.g. Name, Tags assigned, ProvisioningState, etc. and were almost giving up when this thought came upon to write a small one on our own.   sharing here before things get lost.…
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

Azure ARM Blob Snapshot – Azure Automation

We have had some tough time backing up virtual machines based out of customized VHD and running OS prior to Windows Server 2008 R2 SP1, The reason being, Azure Virtual Machine Guest agent does is not supported in any of these OS, i.e. Windows Server 2003 R2, Windows XP, etc. (You might wonder is it…
Read more

PowerShell script to expand an Azure VM OS disk size

This script helps to expand an Azure VM OS disk size.   We normally can do this from the Azure Portal after we shut down the VM.  However, some of the VMs running custom VHD based out of Windows Server 2003,  we are not able to find the option to specify os disk size even…
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