📚 AZ-104 Series: This is Part 3 of 67 in the complete Azure Administrator (AZ-104) study guide.
Introduction
Welcome to this detailed study guide on Azure Portal, CLI, and PowerShell, a crucial topic for the AZ-104 exam. As a beginner in the world of Azure, it’s essential to understand the various management interfaces provided by Microsoft Azure to manage and interact with your cloud resources. In this blog post, we’ll delve into the world of Azure management interfaces, exploring the Azure Portal, Azure CLI, and PowerShell. By the end of this post, you’ll have a solid understanding of these tools, how they work, and how to use them to manage your Azure resources.
The AZ-104 exam, also known as the Microsoft Azure Administrator exam, tests your skills in managing and maintaining Microsoft Azure services. A significant portion of the exam focuses on your ability to use the Azure Portal, CLI, and PowerShell to perform various tasks, such as creating and managing resources, configuring security and identity, and monitoring and troubleshooting issues. Therefore, it’s vital to have a deep understanding of these management interfaces to pass the exam and become a proficient Azure administrator.
In this post, we’ll cover the core concepts of Azure management interfaces, including the Azure Portal, Azure CLI, and PowerShell. We’ll explore how these tools work, their architecture, and components. We’ll also provide step-by-step guides on how to use the Azure Portal and Azure CLI, along with examples of relevant commands and scripts. By the end of this post, you’ll be well-prepared to manage your Azure resources like a pro and ace the AZ-104 exam.
Core Concepts
Let’s start with the core concepts of Azure management interfaces. The Azure Portal is a web-based interface that allows you to manage and interact with your Azure resources. It provides a user-friendly interface to create, configure, and manage resources such as virtual machines, storage accounts, and networks. The Azure Portal is like a control panel for your Azure subscription, where you can monitor and manage all your resources from a single dashboard.
The Azure CLI (Command-Line Interface) is a command-line tool that allows you to manage and interact with your Azure resources from the command line. It provides a more efficient and automated way to manage resources, especially when you need to perform repetitive tasks or manage large-scale deployments. The Azure CLI is like a powerful robot that can execute commands and scripts to manage your Azure resources with precision and speed.
PowerShell is a task-based command-line shell and scripting language built on the .NET framework. It provides a powerful way to automate and manage Windows systems, including Azure resources. PowerShell is like a skilled engineer who can write scripts and automate tasks to manage your Azure resources with ease and precision.
Cloud Shell is a free, browser-based shell that allows you to manage and interact with your Azure resources from the cloud. It provides a convenient way to access the Azure CLI and PowerShell from anywhere, without the need to install any software or tools on your local machine. Cloud Shell is like a virtual toolbox that provides access to all the tools and scripts you need to manage your Azure resources from the cloud.
How It Works
Now that we’ve covered the core concepts, let’s dive deeper into how these management interfaces work. The Azure Portal is built on top of the Azure Resource Manager (ARM), which provides a consistent management layer for all Azure resources. The ARM allows you to create, configure, and manage resources using a single API, which is used by the Azure Portal, Azure CLI, and PowerShell.
The Azure CLI and PowerShell use the ARM API to interact with Azure resources. When you run a command or script, it sends a request to the ARM API, which then executes the request and returns the result. The Azure CLI and PowerShell provide a command-line interface to interact with the ARM API, making it easier to manage and automate Azure resources.
Cloud Shell provides a browser-based interface to access the Azure CLI and PowerShell. When you launch Cloud Shell, it creates a temporary container that runs the Azure CLI or PowerShell, allowing you to access the ARM API and manage your Azure resources. Cloud Shell also provides a file system and storage, allowing you to store and manage files and scripts.
The architecture of Azure management interfaces consists of several components, including the Azure Portal, Azure CLI, PowerShell, Cloud Shell, and ARM API. These components work together to provide a seamless and integrated management experience for Azure resources. The Azure Portal provides a user-friendly interface, while the Azure CLI and PowerShell provide a command-line interface for automation and scripting. Cloud Shell provides a browser-based interface to access the Azure CLI and PowerShell, and the ARM API provides a consistent management layer for all Azure resources.
Step-by-Step Guide: Azure Portal
Now that we’ve covered the core concepts and architecture, let’s provide a step-by-step guide on how to use the Azure Portal. Here are the steps:
- Sign in to the Azure Portal using your Azure account credentials.
- Navigate to the dashboard, which provides an overview of your Azure resources and subscriptions.
- Click on the “Create a resource” button to create a new resource, such as a virtual machine or storage account.
- Fill in the required details, such as the resource name, location, and configuration options.
- Click on the “Create” button to create the resource.
- Navigate to the resource page to configure and manage the resource.
- Use the navigation menu to access other Azure services and features, such as security, networking, and monitoring.
- Use the search bar to find and access specific resources or services.
By following these steps, you can easily create and manage Azure resources using the Azure Portal.
Azure CLI Commands
az login – Log in to your Azure account using the Azure CLI. az account show – Display information about your Azure account. az group create – Create a new resource group. az vm create – Create a new virtual machine. az storage account create – Create a new storage account. az network vnet create – Create a new virtual network.
These are just a few examples of Azure CLI commands. You can use the az --help command to display a list of available commands and options.
az vm --help – Display help information for the az vm command. az storage account --help – Display help information for the az storage account command.
By using these commands, you can manage and interact with your Azure resources using the Azure CLI.
Real-World Use Cases
Azure Portal, CLI, and PowerShell are essential tools for managing and interacting with Azure services. Here are three detailed practical scenarios with examples to illustrate their real-world use cases.
In the first scenario, suppose you are a cloud administrator responsible for deploying and managing Azure resources for a large enterprise. You can use the Azure Portal to create and manage resource groups, virtual machines, storage accounts, and networks. For example, you can use the Azure Portal to create a new resource group, deploy a virtual machine, and configure its networking settings. You can also use the Azure Portal to monitor the performance and health of your resources, and to troubleshoot issues as they arise.
In the second scenario, suppose you are a DevOps engineer responsible for automating the deployment and management of Azure resources. You can use the Azure CLI or PowerShell to automate repetitive tasks, such as creating and deploying resources, configuring settings, and monitoring performance. For example, you can use the Azure CLI to create a new storage account, deploy a container instance, and configure its settings using a script. You can also use PowerShell to automate the deployment of a web application to Azure App Service, and to configure its settings and monitor its performance.
In the third scenario, suppose you are a security administrator responsible for managing access and security for Azure resources. You can use the Azure Portal, CLI, or PowerShell to manage access control, configure security settings, and monitor security logs. For example, you can use the Azure Portal to create a new role-based access control (RBAC) role, assign it to a user or group, and configure its permissions. You can also use the Azure CLI or PowerShell to configure security settings, such as enabling Azure Security Center, configuring threat protection, and monitoring security logs.
- Use the Azure Portal to create and manage resource groups, virtual machines, storage accounts, and networks.
- Use the Azure CLI or PowerShell to automate repetitive tasks, such as creating and deploying resources, configuring settings, and monitoring performance.
- Use the Azure Portal, CLI, or PowerShell to manage access control, configure security settings, and monitor security logs.
Best Practices
Here are at least 8 best practices to keep in mind when using Azure Portal, CLI, and PowerShell:
First, always use the latest version of the Azure CLI or PowerShell to ensure you have the latest features and security updates. Second, use a secure and consistent naming convention for your resources to make them easy to identify and manage. Third, use resource groups to organize your resources and make them easier to manage. Fourth, use tags to categorize and track your resources, and to make them easier to search and filter. Fifth, use Azure Policy to enforce compliance and governance requirements across your resources. Sixth, use Azure Monitor to monitor the performance and health of your resources, and to troubleshoot issues as they arise. Seventh, use Azure Security Center to monitor and protect your resources from security threats. Eighth, use Role-Based Access Control (RBAC) to manage access and permissions for your resources.
Additional best practices include using automation scripts to automate repetitive tasks, using version control to track changes to your scripts and configurations, and using testing and validation to ensure your scripts and configurations are working as expected. You should also use secure storage for sensitive data, such as secrets and credentials, and use encryption to protect data in transit and at rest.
- Always use the latest version of the Azure CLI or PowerShell.
- Use a secure and consistent naming convention for your resources.
- Use resource groups to organize your resources.
- Use tags to categorize and track your resources.
- Use Azure Policy to enforce compliance and governance requirements.
- Use Azure Monitor to monitor the performance and health of your resources.
- Use Azure Security Center to monitor and protect your resources from security threats.
- Use Role-Based Access Control (RBAC) to manage access and permissions for your resources.
Common Mistakes to Avoid
Here are at least 5 common mistakes to avoid when using Azure Portal, CLI, and PowerShell:
First, not using a secure and consistent naming convention for your resources can make them difficult to identify and manage. Second, not using resource groups to organize your resources can make them harder to manage and monitor. Third, not using tags to categorize and track your resources can make them harder to search and filter. Fourth, not using Azure Policy to enforce compliance and governance requirements can lead to security and compliance issues. Fifth, not using Role-Based Access Control (RBAC) to manage access and permissions for your resources can lead to security issues and unauthorized access.
Additional mistakes to avoid include not using automation scripts to automate repetitive tasks, not using version control to track changes to your scripts and configurations, and not using testing and validation to ensure your scripts and configurations are working as expected. You should also avoid using insecure storage for sensitive data, such as secrets and credentials, and avoid using unencrypted data in transit and at rest.
To fix these mistakes, you should use a secure and consistent naming convention for your resources, use resource groups to organize your resources, use tags to categorize and track your resources, use Azure Policy to enforce compliance and governance requirements, and use Role-Based Access Control (RBAC) to manage access and permissions for your resources. You should also use automation scripts to automate repetitive tasks, use version control to track changes to your scripts and configurations, and use testing and validation to ensure your scripts and configurations are working as expected.
- Not using a secure and consistent naming convention for your resources.
- Not using resource groups to organize your resources.
- Not using tags to categorize and track your resources.
- Not using Azure Policy to enforce compliance and governance requirements.
- Not using Role-Based Access Control (RBAC) to manage access and permissions for your resources.
AZ-104 Exam Tips
Here are some key points to memorize for the AZ-104 exam:
First, make sure you understand the basics of Azure Portal, CLI, and PowerShell, including how to create and manage resources, configure settings, and monitor performance. Second, make sure you understand how to use Azure Policy to enforce compliance and governance requirements, and how to use Role-Based Access Control (RBAC) to manage access and permissions for your resources. Third, make sure you understand how to use Azure Monitor to monitor the performance and health of your resources, and how to use Azure Security Center to monitor and protect your resources from security threats.
Typical exam question styles include multiple-choice questions, case studies, and hands-on labs. Make sure you are familiar with the exam format and the types of questions you will encounter. Gotchas to watch out for include questions that require you to have hands-on experience with Azure Portal, CLI, and PowerShell, as well as questions that require you to understand complex concepts and scenarios.
To prepare for the exam, make sure you have hands-on experience with Azure Portal, CLI, and PowerShell, and make sure you understand the key concepts and scenarios that will be covered on the exam. You should also practice with sample questions and case studies to help you prepare for the exam format and the types of questions you will encounter.
- Understand the basics of Azure Portal, CLI, and PowerShell.
- Understand how to use Azure Policy to enforce compliance and governance requirements.
- Understand how to use Role-Based Access Control (RBAC) to manage access and permissions for your resources.
- Understand how to use Azure Monitor to monitor the performance and health of your resources.
- Understand how to use Azure Security Center to monitor and protect your resources from security threats.
Summary and Next Steps
In this blog post, we covered the basics of Azure Portal, CLI, and PowerShell, including how to create and manage resources, configure settings, and monitor performance. We also covered real-world use cases, best practices, common mistakes to avoid, and AZ-104 exam tips.
To summarize, Azure Portal, CLI, and PowerShell are essential tools for managing and interacting with Azure services. By following best practices and avoiding common mistakes, you can ensure that your Azure resources are secure, compliant, and well-managed. By preparing for the AZ-104 exam, you can demonstrate your skills and knowledge of Azure and take your career to the next level.
Next steps include continuing to learn and practice with Azure Portal, CLI, and PowerShell, as well as exploring other Azure services and features. You should also consider taking the AZ-104 exam to demonstrate your skills and knowledge of Azure. Additional resources include the official Azure documentation, Azure tutorials and guides, and online courses and training programs.
By following these next steps and continuing to learn and practice with Azure, you can become an expert in Azure and take your career to the next level. Remember to always follow best practices, avoid common mistakes, and prepare for the AZ-104 exam to ensure your success with Azure.
- Continue to learn and practice with Azure Portal, CLI, and PowerShell.
- Explore other Azure services and features.
- Consider taking the AZ-104 exam to demonstrate your skills and knowledge of Azure.
- Use additional resources, such as the official Azure documentation, Azure tutorials and guides, and online courses and training programs.
Please refer previous blog of this series: Part 2





Leave a Reply