Tag: PowerShell Script

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 script to set Azure key vault key auto rotation policy

One of the pen-testing results, as well as the Azure security advisor recommendation, is to have an expiry date for the azure key vault keys. Although not all keys can be rotated at all times because they may be associated with one or the other option depending on how they are used in any Azure…
Read more

PowerShell script used to Delete resourcegroup level locks in all your Azure Subscriptions

A script used to get the list of all ResourceGroups matching a naming format in all your Azure Subscriptions. It will check for existence of a ResourceGroup level lock presence and if present, it will delete them.

PowerShell script used to create resource group level locks in all your Azure Subscriptions

A script used to get the list of all ResourceGroups in all your Azure Subscriptions. It will check for existence of a ResourceGroup level lock presence and if not present will create a lock.

PowerShell Script to Generate the Virtual Machine Inventory Hosted in Azure ARM

Overview This is a PowerShell script to create reports for all Virtual machines in a subscription including its Resource Group / Virtual Network /IP/NIC/Data disk/Storage/Tags to readable .csv format to help you to identify the deviation and make them standard. The following guide assumes that the user has basic knowledge of using Windows and PowerShell.…
Read more

Azure VM deletion using the PowerShell script

Often you might receive a request to Delete multiple VMs from Azure. its little cumbersome to delete VM and its components from portal. Automation minimize the time and avoid human errors. This could cover the below scenarios: Delete VM, its associated NICs and disks. The following guide assumes that the user has basic knowledge of…
Read more

Assign Tags for virtual machines provided in an input file

Automation | VM Tags Creation Overview Tagcreation.ps1 is a PowerShell script to create tags for all VMs provided in the input csv, Azure tag is an important feature that helps you to identify the deviation and make them standard. Also you can make use of tags in the Azure automation runbook to customise many automation…
Read more