您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure PowerShell 概述Overview of Azure PowerShell

Azure PowerShell 提供一组可以使用 Azure 资源管理器模型管理 Azure 资源的 cmdlet。Azure PowerShell provides a set of cmdlets that use the Azure Resource Manager model for managing your Azure resources. Azure PowerShell 使用了 .NET Standard,这使得它可用于 Windows、macOS 和 Linux。Azure PowerShell uses .NET Standard, making it available for Windows, macOS, and Linux. 还可以在 Azure Cloud Shell 中使用 Azure PowerShell。Azure PowerShell is also available on Azure Cloud Shell.

关于新的 Az 模块About the new Az module

本文档介绍了 Azure PowerShell 的新 Az 模块。This documentation describes the new Az module for Azure PowerShell. 此新模块是采用 .NET Standard 从头开始编写的。This new module is written from the ground up in .NET Standard. 由于采用了 .NET Standard,Azure PowerShell 可以在 Windows 上的 PowerShell 5.1 下运行,也可以在任何平台上的 PowerShell Core 6.x 及更高版本下运行。Using .NET Standard allows Azure PowerShell to run under PowerShell 5.1 on Windows or PowerShell Core 6.x and later on any platform. Az 模块现在是通过 PowerShell 与 Azure 进行交互的首选方式。The Az module is now the intended way to interact with Azure through PowerShell. AzureRM 将继续进行 bug 修复,但不会再收到新功能。AzureRM will continue to get bug fixes, but no longer receive new features.

请在 Azure PowerShell Az 模块简介中了解关于新模块的完整详细信息,包括命令如何进行了重命名,以及针对 AzureRM 的维护计划。Learn the full details about the new module, including how commands have been renamed and the maintenance plans for AzureRM, in the Introducing the Azure PowerShell Az module. 如果要立即开始使用新模块,请参阅从 AzureRM 迁移到 AzIf you want to get started with using the new module right away, see Migrate from AzureRM to Az.

还提供了 AzureRM 文档The AzureRM documentation is also available.

重要

虽然 Azure 文档正在更新以反映新的模块 cmdlet 名称,但文章中可能仍在使用 AzureRM 命令。While the Azure documentation is being updated to reflect the new module cmdlet names, articles may still use the AzureRM commands. 安装 Az 模块后,建议通过 Enable-AzureRmAlias 启用 AzureRM cmdlet 别名。After installing the Az module, it's recommended that you enable the AzureRM cmdlet aliases with Enable-AzureRmAlias. 有关更多详细信息,请参阅从 AzureRM 迁移到 AzSee the Migrate from AzureRM to Az article for more details.

运行或安装Run or install

可以在 Windows 上通过 PowerShell 5.1 或更高版本安装 Azure PowerShell,在任何平台上通过 PowerShell Core 6.x 及更高版本进行安装,还可以在 Azure Cloud Shell 中运行它。You can install Azure PowerShell on PowerShell 5.1 or higher on Windows, PowerShell Core 6.x and later on any platform, or run in Azure Cloud Shell.

有关最新 Azure PowerShell 版本的信息,请参阅发行说明For information about the latest Azure PowerShell release, see the release notes.

入门Get Started

请参阅 Azure PowerShell 入门一文了解 Azure PowerShell 基础知识。Read the Get Started with Azure PowerShell article to learn the Azure PowerShell basics. 如果你不熟悉 PowerShell,请参阅以下简介文章:If you're not familiar with PowerShell, an introduction might be helpful:

以下示例可帮助你了解 Azure 的一些常见用法:The following samples can help you with some common uses of Azure:

利用 Microsoft Learn 掌握技能Build your skills with Microsoft Learn

其他 Azure PowerShell 模块Other Azure PowerShell modules