A little while ago, I wrote about building, using and destroying environments on Azure. At first, what I proposed may have seemed like overkill, so I took this as a challenge and built this short demo project to demonstrate why I favor destroying environments to shutting them down.
On & Off – Done Right on Azure
The ideas express in this post apply to Infrastructure as a Service (IaaS). Where we preserve networking, security and state while temporarily removing compute. When the time comes, we restore the compute resources and operate normally.
The environment built for this demo is composed of 10 Oracle Linux Virtual Machines (VM) deployed in an Availability Set. A Virtual Network (VNet) and Network Security Groups (NSG) are used to protect the VMs. To make this demo more like real life, I added a Data Disk and a Public IP (PIP) to each VM. To prepare the environment for a load balanced Web Application, I added a Load Balancer (LB) to distribute the HTTP traffic.

The Levers
Using Azure Resource Management (ARM), we are able to describe our environment as Code. It also allows us to be more agile with our environments. And helps us design, iterate and deploy with more speed and quality. Since the process of deploying a template is idempotent, we can start small and deploy incremental versions.
Creating The Environment
To create the demo environment, we first create a Resource Group. Then we deploy the azuredeploy.json template, that is detailed below.
Azure PowerShell V1.0
# Login to your Azure Account Login-AzureRmAccount # Switch to my MSDN Account Select-AzureSubscription -SubscriptionName 'Visual Studio Ultimate with MSDN' -Current # Create a Resource Group New-AzureRmResourceGroup -Name 'oraclevms' -Location 'eastus' # Deploy the Template to the Resource Group New-AzureRmResourceGroupDeployment -ResourceGroupName 'oraclevms' ` -TemplateFile 'azuredeploy.json' ` -TemplateParameterFile 'azuredeploy.parameters.json' ` -Verbose
Turning The Environment Off
To turn off the demo environment, we first shutdown the VMs and delete them. We make sure that we keep the OS Disk VHD and Data Disk VHD.

Azure PowerShell V1.0
# Login to your Azure Account Login-AzureRmAccount # Shutdown VMs Get-AzureRmVM -ResourceGroupName 'oraclevms' ` | Stop-AzureRmVM -Force -Verbose # Destroy VMs and Preserve State Get-AzureRmVM -ResourceGroupName 'oraclevms' ` | Remove-AzureRmVM -Force -Verbose
Turning The Environment On
To turn on the demo environment, we deploy the azuredeploy-redeploy.json template, that is detailed below, to the environments’ Resource Group.

Azure PowerShell V1.0
# Login to your Azure Account Login-AzureRmAccount # Redeploy VMs using exisitng VHDs for OS and Data New-AzureRmResourceGroupDeployment -ResourceGroupName 'oraclevms' ` -TemplateFile 'azuredeploy-redeploy.json' ` -TemplateParameterFile 'azuredeploy.parameters.json' ` -Verbose
The Templates
Azure Resource Manager, enables us to work with the resources in our solution as a group. We can deploy, update or delete all of the resources for an environment in a single, coordinated operation. Furthermore we can use that template for different environments such as testing, staging and production. It provides security, auditing, and tagging features to help us manage our resources after deployment. Here are some of its benefits:
- You can deploy, manage, and monitor all of the resources for your solution as a group, rather than handling these resources individually.
- You can repeatedly deploy your solution throughout the development lifecycle and have confidence your resources are deployed in a consistent state.
- You can use declarative templates to define your deployment.
- You can define the dependencies between resources so they are deployed in the correct order.
- You can apply access control to all services in your resource group because Role-Based Access Control (RBAC) is natively integrated into the management platform.
- You can apply tags to resources to logically organize all of the resources in your subscription.
- You can clarify billing for your organization by viewing the rolled-up costs for the entire group or for a group of resources sharing the same tag.
Creating The Environment – azuredeploy.json
The creation template is built to setup an environment from scratch. It creates the Virtual Machines (VM) from a VM Image, the OS Disk and Data Disk. It creates the networking and security resources.
To duplicate a resource, I used the copy operation. It enables us to use an index number to accomplish various goals like naming VMs, NICs, PIPs and other resources.
{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "storageType": { "type": "string", "defaultValue": "Standard_LRS", "allowedValues": [ "Standard_LRS", "Standard_ZRS", "Standard_GRS", "Standard_RAGRS", "Premium_LRS" ] }, "vmNamePrefix": { "type": "string", "minLength": 1, "defaultValue": "alexoracle" }, "userName": { "type": "string", "minLength": 1, "defaultValue": "admdemo" }, "adminPwd": { "type": "securestring" }, "OSVersion": { "type": "string", "defaultValue": "OL70", "allowedValues": [ "OL70" ] }, "pipVmDnsName": { "type": "string", "minLength": 1, "defaultValue": "alexlinuxdemo" }, "pipLbDnsName": { "type": "string", "minLength": 1, "defaultValue": "alexlinuxlbdemo" } }, "variables": { "availabilitySetName": "alexavailabilityset", "vmCount": 10, "vnetName": "alexvnet", "vnetPrefix": "10.0.0.0/16", "subnet1Name": "subnet", "subnet1Prefix": "10.0.0.0/24", "networkSecurityGroupsName": "alexnsg", "vmNamePrefix": "alexoracle", "imagePublisher": "oracle", "imageOffer": "Oracle-Linux-7", "OSDiskName": "OSDisk", "vmSize": "Standard_D1", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", "subnetRef": "[concat(variables('vnetID'), '/subnets/', variables('subnet1Name'))]", "storageAccountContainerName": "vhds", "nicName": "[concat(parameters('vmNamePrefix'), 'NetworkInterface')]", "publicIPAddress": "alexmsvm", "lbPublicIPAddressName": "alexms", "lbPublicIPAddressType": "Dynamic", "lbName": "lbalexms", "publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses', variables('lbPublicIPAddressName'))]", "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbName'))]", "frontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontend')]" }, "resources": [ { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupsName')]", "location": "[resourceGroup().location]", "tags": { "displayName": "Network Security Groups" }, "properties": { "securityRules": [ { "name": "ssh_rule", "properties": { "description": "Allow SSH", "protocol": "Tcp", "sourcePortRange": "*", "destinationPortRange": "22", "sourceAddressPrefix": "Internet", "destinationAddressPrefix": "*", "access": "Allow", "priority": 101, "direction": "Inbound" } }, { "name": "web_rule", "properties": { "description": "Allow WEB", "protocol": "Tcp", "sourcePortRange": "*", "destinationPortRange": "80", "sourceAddressPrefix": "Internet", "destinationAddressPrefix": "*", "access": "Allow", "priority": 100, "direction": "Inbound" } } ] } }, { "name": "[variables('vnetName')]", "type": "Microsoft.Network/virtualNetworks", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupsName'))]" ], "tags": { "displayName": "VNet" }, "properties": { "addressSpace": { "addressPrefixes": [ "[variables('vnetPrefix')]" ] }, "subnets": [ { "name": "[variables('subnet1Name')]", "properties": { "addressPrefix": "[variables('subnet1Prefix')]", "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupsName'))]" } } } ] } }, { "name": "[concat(variables('publicIPAddress'), copyIndex())]", "type": "Microsoft.Network/publicIPAddresses", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ ], "tags": { "displayName": "Public IP" }, "copy": { "count": "[variables('vmCount')]", "name": "pipCounter" }, "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { "domainNameLabel": "[concat(parameters('pipVmDnsName'), copyIndex())]" } } }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('lbPublicIPAddressName')]", "location": "[resourceGroup().location]", "tags": { "displayName": "LB Public IP" }, "properties": { "publicIPAllocationMethod": "[variables('lbPublicIPAddressType')]", "dnsSettings": { "domainNameLabel": "[variables('lbPublicIPAddressName')]" } } }, { "name": "[variables('vmNamePrefix')]", "type": "Microsoft.Storage/storageAccounts", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ ], "tags": { "displayName": "Storage Account" }, "properties": { "accountType": "[parameters('storageType')]" } }, { "name": "[concat(variables('nicName'), copyIndex())]", "type": "Microsoft.Network/networkInterfaces", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]", "[concat('Microsoft.Network/publicIPAddresses/', concat(variables('publicIPAddress'), copyIndex()))]", "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]" ], "tags": { "displayName": "NIC" }, "copy": { "count": "[variables('vmCount')]", "name": "nicCounter" }, "properties": { "ipConfigurations": [ { "name": "[concat('ipconfig', copyIndex())]", "properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('subnetRef')]" }, "publicIPAddress": { "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(variables('publicIPAddress'), copyIndex()))]" }, "loadBalancerBackendAddressPools": [ { "id": "[concat(variables('lbID'), '/backendAddressPools/LoadBalancerBackend')]" } ] } } ] } }, { "name": "[concat(parameters('vmNamePrefix'), copyIndex())]", "type": "Microsoft.Compute/virtualMachines", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('vmNamePrefix'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyIndex())]", "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" ], "copy": { "count": "[variables('vmCount')]", "name": "vmCounter" }, "tags": { "displayName": "Oracle VMs" }, "properties": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('availabilitySetName'))]" }, "hardwareProfile": { "vmSize": "[variables('vmSize')]" }, "osProfile": { "computerName": "[concat(parameters('vmNamePrefix'), copyIndex())]", "adminUsername": "[parameters('userName')]", "adminPassword": "[parameters('adminPwd')]" }, "storageProfile": { "imageReference": { "publisher": "[variables('imagePublisher')]", "offer": "[variables('imageOffer')]", "sku": "[parameters('OSVersion')]", "version": "latest" }, "osDisk": { "name": "OSDisk", "vhd": { "uri": "[concat('http://', variables('vmNamePrefix'), '.blob.core.windows.net/', variables('storageAccountContainerName'), '/', concat(variables('OSDiskName'), copyIndex()), '.vhd')]" }, "caching": "ReadWrite", "createOption": "FromImage" }, "dataDisks": [ { "createOption": "Empty", "lun": 0, "diskSizeGB": "100", "name": "DATA", "vhd": { "uri": "[concat('http://', variables('vmNamePrefix'), '.blob.core.windows.net/', variables('storageAccountContainerName'), '/', concat('DataDisk', copyIndex()), '.vhd')]" } } ] }, "networkProfile": { "networkInterfaces": [ { "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('nicName'), copyIndex()))]" } ] } } }, { "name": "[variables('availabilitySetName')]", "type": "Microsoft.Compute/availabilitySets", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ ], "tags": { "displayName": "Availability Set" } }, { "apiVersion": "2015-06-15", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", "location": "[resourceGroup().location]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('lbPublicIPAddressName'))]" ], "tags": { "displayName": "Public Load Balancer" }, "properties": { "frontendIPConfigurations": [ { "name": "LoadBalancerFrontend", "properties": { "publicIPAddress": { "id": "[variables('publicIPAddressID')]" } } } ], "backendAddressPools": [ { "name": "LoadBalancerBackend" } ], "loadBalancingRules": [ { "properties": { "frontendIPConfiguration": { "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('lbName')), '/frontendIpConfigurations/LoadBalancerFrontend')]" }, "backendAddressPool": { "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('lbName')), '/backendAddressPools/LoadBalancerBackend')]" }, "probe": { "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('lbName')), '/probes/lbprobe')]" }, "protocol": "Tcp", "frontendPort": 80, "backendPort": 80, "idleTimeoutInMinutes": 15 }, "Name": "lbruleport80" } ], "probes": [ { "properties": { "protocol": "Tcp", "port": 80, "intervalInSeconds": 15, "numberOfProbes": 2 }, "name": "lbprobe" } ] } } ], "outputs": { } }
Turning The Environment On – azuredeploy-redeploy.json
This template is a modified version of the azuredeploy.json template. It reuses previously created artefacts to recreate the Virtual Machines (VM) in an Azure datacenter. This has a few benefits, the first being that it will force Azure to find the best place to host your VMs. This method is predictable and will give you the most consistent results.
Changes include changing the Disk “createOption” property to “Attach” instead of “FromImage” or “Empty”. The “imageReference” storage profile property was also removed. Lastly, the “diskSizeGB” property was removed from Data Disks as it is not required for attaching excising VHDs. This effectively allows us to create the Virtual Machines from the existing artefacts.
{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "storageType": { "type": "string", "defaultValue": "Standard_LRS", "allowedValues": [ "Standard_LRS", "Standard_ZRS", "Standard_GRS", "Standard_RAGRS", "Premium_LRS" ] }, "vmNamePrefix": { "type": "string", "minLength": 1, "defaultValue": "alexoracle" }, "userName": { "type": "string", "minLength": 1, "defaultValue": "admdemo" }, "adminPwd": { "type": "securestring" }, "pipVmDnsName": { "type": "string", "minLength": 1, "defaultValue": "alexlinuxdemo" }, "pipLbDnsName": { "type": "string", "minLength": 1, "defaultValue": "alexlinuxlbdemo" } }, "variables": { "availabilitySetName": "alexavailabilityset", "vmCount": 10, "vnetName": "alexvnet", "vnetPrefix": "10.0.0.0/16", "subnet1Name": "subnet", "subnet1Prefix": "10.0.0.0/24", "networkSecurityGroupsName": "alexnsg", "vmNamePrefix": "alexoracle", "OSDiskName": "OSDisk", "vmSize": "Standard_D1", "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]", "subnetRef": "[concat(variables('vnetID'), '/subnets/', variables('subnet1Name'))]", "storageAccountContainerName": "vhds", "nicName": "[concat(parameters('vmNamePrefix'), 'NetworkInterface')]", "publicIPAddress": "alexmsvm", "lbPublicIPAddressName": "alexms", "lbPublicIPAddressType": "Dynamic", "lbName": "lbalexms", "publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses', variables('lbPublicIPAddressName'))]", "lbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbName'))]", "frontEndIPConfigID": "[concat(variables('lbID'),'/frontendIPConfigurations/loadBalancerFrontend')]" }, "resources": [ { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Network/networkSecurityGroups", "name": "[variables('networkSecurityGroupsName')]", "location": "[resourceGroup().location]", "tags": { "displayName": "Network Security Groups" }, "properties": { "securityRules": [ { "name": "ssh_rule", "properties": { "description": "Allow SSH", "protocol": "Tcp", "sourcePortRange": "*", "destinationPortRange": "22", "sourceAddressPrefix": "Internet", "destinationAddressPrefix": "*", "access": "Allow", "priority": 101, "direction": "Inbound" } }, { "name": "web_rule", "properties": { "description": "Allow WEB", "protocol": "Tcp", "sourcePortRange": "*", "destinationPortRange": "80", "sourceAddressPrefix": "Internet", "destinationAddressPrefix": "*", "access": "Allow", "priority": 100, "direction": "Inbound" } } ] } }, { "name": "[variables('vnetName')]", "type": "Microsoft.Network/virtualNetworks", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupsName'))]" ], "tags": { "displayName": "VNet" }, "properties": { "addressSpace": { "addressPrefixes": [ "[variables('vnetPrefix')]" ] }, "subnets": [ { "name": "[variables('subnet1Name')]", "properties": { "addressPrefix": "[variables('subnet1Prefix')]", "networkSecurityGroup": { "id": "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupsName'))]" } } } ] } }, { "name": "[concat(variables('publicIPAddress'), copyIndex())]", "type": "Microsoft.Network/publicIPAddresses", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ ], "tags": { "displayName": "Public IP" }, "copy": { "count": "[variables('vmCount')]", "name": "pipCounter" }, "properties": { "publicIPAllocationMethod": "Dynamic", "dnsSettings": { "domainNameLabel": "[concat(parameters('pipVmDnsName'), copyIndex())]" } } }, { "apiVersion": "2015-06-15", "type": "Microsoft.Network/publicIPAddresses", "name": "[variables('lbPublicIPAddressName')]", "location": "[resourceGroup().location]", "tags": { "displayName": "LB Public IP" }, "properties": { "publicIPAllocationMethod": "[variables('lbPublicIPAddressType')]", "dnsSettings": { "domainNameLabel": "[variables('lbPublicIPAddressName')]" } } }, { "name": "[variables('vmNamePrefix')]", "type": "Microsoft.Storage/storageAccounts", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ ], "tags": { "displayName": "Storage Account" }, "properties": { "accountType": "[parameters('storageType')]" } }, { "name": "[concat(variables('nicName'), copyIndex())]", "type": "Microsoft.Network/networkInterfaces", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', variables('vnetName'))]", "[concat('Microsoft.Network/publicIPAddresses/', concat(variables('publicIPAddress'), copyIndex()))]", "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]" ], "tags": { "displayName": "NIC" }, "copy": { "count": "[variables('vmCount')]", "name": "nicCounter" }, "properties": { "ipConfigurations": [ { "name": "[concat('ipconfig', copyIndex())]", "properties": { "privateIPAllocationMethod": "Dynamic", "subnet": { "id": "[variables('subnetRef')]" }, "publicIPAddress": { "id": "[resourceId('Microsoft.Network/publicIPAddresses', concat(variables('publicIPAddress'), copyIndex()))]" }, "loadBalancerBackendAddressPools": [ { "id": "[concat(variables('lbID'), '/backendAddressPools/LoadBalancerBackend')]" } ] } } ] } }, { "name": "[concat(parameters('vmNamePrefix'), copyIndex())]", "type": "Microsoft.Compute/virtualMachines", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('vmNamePrefix'))]", "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'), copyIndex())]", "[concat('Microsoft.Compute/availabilitySets/', variables('availabilitySetName'))]" ], "copy": { "count": "[variables('vmCount')]", "name": "vmCounter" }, "tags": { "displayName": "Oracle VMs" }, "properties": { "availabilitySet": { "id": "[resourceId('Microsoft.Compute/availabilitySets',variables('availabilitySetName'))]" }, "hardwareProfile": { "vmSize": "[variables('vmSize')]" }, "storageProfile": { "osDisk": { "name": "OSDisk", "osType": "Linux", "vhd": { "uri": "[concat('http://', variables('vmNamePrefix'), '.blob.core.windows.net/', variables('storageAccountContainerName'), '/', concat(variables('OSDiskName'), copyIndex()), '.vhd')]" }, "caching": "ReadWrite", "createOption": "Attach" }, "dataDisks": [ { "createOption": "Attach", "lun": 0, "name": "DATA", "vhd": { "uri": "[concat('http://', variables('vmNamePrefix'), '.blob.core.windows.net/', variables('storageAccountContainerName'), '/', concat('DataDisk', copyIndex()), '.vhd')]" } } ] }, "networkProfile": { "networkInterfaces": [ { "id": "[resourceId('Microsoft.Network/networkInterfaces', concat(variables('nicName'), copyIndex()))]" } ] } } }, { "name": "[variables('availabilitySetName')]", "type": "Microsoft.Compute/availabilitySets", "location": "[resourceGroup().location]", "apiVersion": "2015-05-01-preview", "dependsOn": [ ], "tags": { "displayName": "Availability Set" } }, { "apiVersion": "2015-06-15", "name": "[variables('lbName')]", "type": "Microsoft.Network/loadBalancers", "location": "[resourceGroup().location]", "dependsOn": [ "[concat('Microsoft.Network/publicIPAddresses/', variables('lbPublicIPAddressName'))]" ], "tags": { "displayName": "Public Load Balancer" }, "properties": { "frontendIPConfigurations": [ { "name": "LoadBalancerFrontend", "properties": { "publicIPAddress": { "id": "[variables('publicIPAddressID')]" } } } ], "backendAddressPools": [ { "name": "LoadBalancerBackend" } ], "loadBalancingRules": [ { "properties": { "frontendIPConfiguration": { "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('lbName')), '/frontendIpConfigurations/LoadBalancerFrontend')]" }, "backendAddressPool": { "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('lbName')), '/backendAddressPools/LoadBalancerBackend')]" }, "probe": { "id": "[concat(resourceId('Microsoft.Network/loadBalancers', variables('lbName')), '/probes/lbprobe')]" }, "protocol": "Tcp", "frontendPort": 80, "backendPort": 80, "idleTimeoutInMinutes": 15 }, "Name": "lbruleport80" } ], "probes": [ { "properties": { "protocol": "Tcp", "port": 80, "intervalInSeconds": 15, "numberOfProbes": 2 }, "name": "lbprobe" } ] } } ], "outputs": { } }
Finding an Oracle Linux VM Image
Since we’re using Resource Manager, we need to find the details that identify the VM Image that we will use to create our demo environment.
Azure PowerShell V1.0
# Login to your Azure Account Login-AzureRmAccount $location = 'eastus' Get-AzureRmVMImagePublisher -Location $location ` | Where-Object -Property PublisherName -Like oracle $publisherName = 'oracle' Get-AzureRmVMImageOffer -Location $location ` -PublisherName $publisherName $offer = 'Oracle-Linux-7' Get-AzureRmVMImageSku -Location $location ` -PublisherName $publisherName ` -Offer $offer ` | Select-Object -Property 'Skus'
Cleanup
Once we’re done experimenting and we no longer require the environment, it’s time to destroy it. The following is great way to cleanup. It destroys everything that is created within the resource group. One thing to keep in mind though… this cannot be reversed.
Azure PowerShell V1.0
# Login to your Azure Account Login-AzureRmAccount Remove-AzureRmResourceGroup -Name 'oraclevms'