DEV Community

Cover image for Azure | Ways to Connect to Microsoft Azure
Hassan BOLAJRAF
Hassan BOLAJRAF

Posted on

Azure | Ways to Connect to Microsoft Azure

Note
You can check other posts on my personal website: https://hbolajraf.net

Microsoft Azure provides several ways to interact with its services, including the command-line interface (CLI), PowerShell, and other tools. Let's explore each of these options:

1. Azure Portal

Azure Portal is a web-based interface for managing Azure resources. It provides a graphical user interface (GUI) for performing various tasks.

Connection

  • Open a web browser and navigate to the Azure Portal.
  • Sign in with your Azure account credentials.
  • Once logged in, you can navigate through the Azure Portal to access and manage your resources.
Note
We can also use Azure PowerShell or Azure CLI within the Azure Portal as shown below. Additionally, we can use them locally as will be described in the next sections.

Image description

2. Azure CLI

Azure CLI is a command-line tool that provides a set of commands to manage Azure resources. It's available on Windows, macOS, and Linux, and it offers a consistent interface across platforms.

Installation

  • Windows: You can install Azure CLI using the MSI installer available from the Azure CLI documentation.
  • macOS: You can install Azure CLI using Homebrew by running brew install azure-cli.
  • Linux: Installation instructions vary depending on the Linux distribution. You can find them in the Azure CLI documentation.

Connection

  • After installation, open a terminal or command prompt.
  • Run az login command. This will open a browser window for authentication.
  • Once authenticated, you will be connected to your Azure subscription.

3. Azure PowerShell

Azure PowerShell is a set of cmdlets for managing Azure resources. It's built on top of the PowerShell scripting language and offers deep integration with Windows environments.

Installation

  • Windows: Azure PowerShell is pre-installed on Windows systems starting with Windows 10. However, you can also install the Az module by running Install-Module -Name Az in PowerShell.
  • macOS and Linux: PowerShell Core is available for non-Windows platforms. After installing PowerShell Core, you can install the Az module similarly to Windows.

Connection

  • Open PowerShell.
  • Run Connect-AzAccount to sign in to Azure.
  • Follow the authentication prompts to complete the sign-in process.

4. Azure SDK for .NET

Azure SDKs are available for various programming languages, including .NET, Python, Java, Node.js, and others. As a .Net developper we will take the Azure SDK for .NET as example, so it allows you to interact with Azure services using .NET programming languages like C#. It provides libraries and APIs to integrate Azure functionality into your applications.

Installation

  • You can install the Azure SDK for .NET via NuGet Package Manager or directly from Visual Studio.

Connection

  • Add the required NuGet packages to your project. For example, for Azure Storage, you would use the Azure.Storage.Blobs package.
  • Authenticate with Azure using Azure Active Directory (AD) credentials or a connection string.
  • Use the SDK's classes and methods to interact with Azure services programmatically.

What next ?

Microsoft Azure offers multiple ways to connect and manage your resources, catering to different preferences and use cases. Whether you prefer command-line interfaces, scripting, graphical user interfaces, or programmatic access, Azure provides tools to suit your needs. Choose the method that best fits your workflow and start managing your Azure resources efficiently.

Top comments (0)