Summary

Completed 200 XP

In this module, you created a PowerShell script to automate the creation of multiple VMs. Despite its relative simplicity, the script showcases the powerful potential of PowerShell when combining loops, variables, and functions with Azure PowerShell cmdlets.

Azure PowerShell is an excellent choice for automating the administration and management of Azure resources. Its clean syntax and powerful scripting capabilities make it a valuable tool, even for administrators new to PowerShell. By automating time-consuming and error-prone tasks, you can reduce administrative overhead and improve overall efficiency and quality.

Clean up

The sandbox automatically cleans up your resources when you're finished with this module.

When you're working in your own subscription, it's a good idea at the end of a project to identify whether you still need the resources you created. Resources that you leave running can cost you money. You can delete resources individually or delete the resource group to delete the entire set of resources.

Use the Remove-AzResourceGroup cmdlet to delete the resource group and all related resources. Replace <resource-group-name> with the name of the resource group you created:

Caution

The following example deletes the specified resource group and all resources contained within it. If resources outside the scope of this training module exist in the specified resource group, they'll also be deleted.

Remove-AzResourceGroup -Name <resource-group-name>

When prompted to confirm the deletion, answer Y and Enter, or add the Force parameter to skip the prompt. The command might take several minutes to complete.

Check your knowledge

1.

True or false: The Azure portal, Azure PowerShell, and Azure CLI offer significantly different services, making it unlikely that all three support the operation you need.

2.

Suppose you're building a video-editing application that offers online storage for user-generated video content. You plan to store the videos in Azure Blobs, so you must create an Azure storage account. Once the storage account is in place, you would unlikely remove and recreate it because all the user videos would be deleted. Which tool is likely to offer the quickest and easiest way to create the storage account?

3.

What needs to be installed on your machine to execute Azure PowerShell cmdlets locally?