Greetings to my fantastic student’s .. I am back with another cool practical . I believe you know I have moved to production from training to learn more . Learning is a never ending process . In last couple of week I have learned lot’s of thing and I am very happy for that .
This post is a combination of multiple practical . If you follow this document you will be able to:
This document is a step by step guidance to remove a azure VM from an existing Availability Set . To make the scenario more realistic first I have encrypted the VM OS disk and then create snapshot from that disk and then create a disk from that snapshot then spin up the VM .
This is the first step to create a VM . Normally you will get a VM created in your subscription .
Code Use In this task :
Before run this command please make sure you have open power-shell in admin and you have installed and imported AzureRM command .
#Intsall-module AzureRM #import-module AzureRM login-azurermaccount $VMRGName = 'ProjectX'; $vmName = 'ProjectXVM'; $KVRGname = 'ProjectX'; $KeyVaultName = 'ProjectXKeyVlt'; $KeyVault = Get-AzKeyVault -VaultName $KeyVaultName -ResourceGroupName $KVRGname; $diskEncryptionKeyVaultUrl = $KeyVault.VaultUri; $KeyVaultResourceId = $KeyVault.ResourceId; Set-AzVMDiskEncryptionExtension -ResourceGroupName $VMRGname -VMName $vmName -DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $KeyVaultResourceId; Get-AzVmDiskEncryptionStatus -ResourceGroupName 'ProjectX' -VMName 'ProjectXVM'
Creating NSG in azure is easy unless you want to create multiple NSG with multiple…
# Mention your VM here $VMName = "SubhenduTestVM" # Mention your Stage Storage here $stagestorageaccountname…
Hope you are doing great . Current Time is very critical for us . I…
Being a part of Microsoft Education I have explored powershell long time back . But…
Sorry !! But Yes . Microsoft is about to release new exam in Azure Segment…
Migration is always a part of our life and part of this fantastic IT world…