![]() ![]() $servicePrincipalConnection = Get-AutomationConnection -name $connectionNameĪdd-AzureRmAccount -ServicePrincipal -TenantID $servicePrincipalConnection.TenantID -ApplicationID $servicePrincipalConnection.ApplicationID -CertificateThumbprint $servicePrincipalConnection.CertificateThumbprint #Getting the service principal connection "AzureRunAsConnection" Now, edit the runbook and copy/paste the following PowerShell code. Go back to the ‘ Modules’ blade and confirm that the module is available In order to import the module, click ‘ Import’īefore validating the wizard, select the checkbox in order to update all the modules. Go to ‘Modules gallery’ and search for ‘AzureRM.Resource’ which is a module we need in the runbook. The runbook is created, but before going deeper, we must update the modules. Description: it is optional, but you can describe the goal of this runbook.Runbook Type: Select PowerShell in this case, but you can select another type if needed.Name: It is a friendly name for the Runbook. ![]() If you don’t already have an existing automation account, then create a new one. Now, we can create the Runbook from the Azure Automation blade. Open the Azure Portal, navigate to the Virtual Machine blade and ‘ Tags’: First, we have to create the tag on the Virtual Machines that must be snapshotted. In this article, I will create daily snapshots of the disks which have associated tagname ‘Snapshot’ with tagvalue ‘True’. In this article, I will explain the second option in order to automate the process of creating disk snapshots using PowerShell. It is great when you try to backup a VM for which Azure Backup can not be used. Second method is creating VM disk snapshots in order to backup a disk manually. Data can be backed up and recovered at a granular level. The Azure Backup service backs up data from on-premises machines, and Azure VMs. ![]() There are two ways to backup your Azure Virtual Machines: First method is using the Azure Backup service in order to backup Virtual Machine periodically based on a backup policy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |