虚拟机规模集的 Azure PowerShell 示例。Azure PowerShell samples for virtual machine scale sets.

下表包含使用 Azure PowerShell 生成的 bash 脚本的链接。The following table includes links to bash scripts built using Azure PowerShell.

创建和管理规模集Create and manage a scale set
创建简单的虚拟机规模集Create a simple virtual machine scale set 使用最低配置创建虚拟机规模集。Creates a virtual machine scale set with minimal configuration.
创建完整的虚拟机规模集Create a complete virtual machine scale set 使用配置文件创建虚拟机规模集和相关资源。Creates a virtual machine scale set and associated resources with a configuration file.
从自定义 VM 映像创建规模集Create a scale set from a custom VM image 创建使用自定义 VM 映像的虚拟机规模集。Creates a virtual machine scale set that uses a custom VM image.
将应用程序安装到规模集Install applications to a scale set 使用 Azure 自定义脚本扩展可将基本 Web 应用程序安装到规模集中。Use the Azure Custom Script Extension to install a basic web application into a scale set.
管理存储Manage storage
创建规模集并向其附加磁盘Create and attach disks to a scale set 创建附加了数据磁盘的虚拟机规模集。Creates a virtual machine scale set with attached data disks.
管理缩放和冗余Manage scale and redundancy
启用基于主机的自动缩放Enable host-based autoscale 创建配置为基于 CPU 使用情况自动缩放的虚拟机规模集。Creates a virtual machine scale that is configured to automatically scale based on CPU usage.

Note

本文进行了更新,以便使用新的 Azure PowerShell Az 模块。This article has been updated to use the new Azure PowerShell Az module. 你仍然可以使用 AzureRM 模块,至少在 2020 年 12 月之前,它将继续接收 bug 修补程序。You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. 若要详细了解新的 Az 模块和 AzureRM 兼容性,请参阅新 Azure Powershell Az 模块简介To learn more about the new Az module and AzureRM compatibility, see Introducing the new Azure PowerShell Az module. 有关 Az 模块安装说明,请参阅安装 Azure PowerShellFor Az module installation instructions, see Install Azure PowerShell.