PowerShell script to add a disk on Azure VM

  $rgName = ‘testingsan’ $vmName = ‘testingsan’ $location = ‘myAzureLocation’ $storageType = ‘StandardLRS’   Function Dateformat {        $date =Get-Date -UFormat “%y%m%d%H%M”      $date.ToString()      }   $df = Dateformat     $dataDiskName = $vmName + ‘_datadisk’+‘_’+$df   $diskConfig = New-AzureRmDiskConfig -AccountType $storageType -Location $location -CreateOption Empty –DiskSizeGB 9999   $dataDisk = New-AzureRmDisk -DiskName … Continue reading PowerShell script to add a disk on Azure VM