Creates a virtual machine scale set (VMSS).
Syntax
New-AzVmss
   [-ResourceGroupName] <String>
   [-VMScaleSetName] <String>
   [[-VirtualMachineScaleSetType] <String>]
   [[-ImageReferenceSku] <String>]
   [[-ImageReferenceOffer] <String>]
   [[-ImageReferencePublisher] <String>]
   [[-ImageReferenceVersion] <String>]
   [[-Credential] <PSCredential>]
   [[-Size] <String>]
   [[-MaxInstanceCount] <Int32>]
   [[-UpgradePolicyMode] <String>]
   [[-ComputerNamePrefix] <String>]
   [[-SubnetId] <String>]
   [[-VnetName] <String>]
   [[-PublicIpAddressConfiguration] <PublicIpAddressConfiguration[]>]
   [[-LoadBalancer] <LoadBalancer>]
   [[-LoadBalancerBackendAddressPool] <BackendAddressPool[]>]
   [[-Tag] <Hashtable[]>]
   [[-PlatformFaultDomain] <Int32>]
   [[-ApplicationGateway] <ApplicationGateway>]
   [[-ApplicationGatewayBackendAddressPool] <BackendAddressPool[]>]
   [[-OrchestrationMode] <String>]
   [[-IdentityType] <VMScaleSetIdentityType>]
   [[-UserIdentity] <String[]>]
   [[-ServicePrincipalType] <ServicePrincipalType>]
   [[-TenantId] <String>]
   [[-ApplicationId] <String>]
   [[-CredentialServicePrincipal] <PSCredential>]
   [[-KeyVaultVaultUri] <String>]
   [[-KeyVaultKeyUrl] <String>]
   [[-Zone] <String[]>]
   [[-DefaultProfile] <IAzureContextContainer>]
   [[-WhatIf] <SwitchParameter>]
   [[-Confirm] <SwitchParameter>]Description
The New-AzVmss cmdlet creates a virtual machine scale set (VMSS). A VMSS allows you to deploy and manage a set of identical virtual machines. You can use VMSS to provide high availability and application scalability to your workload.
Parameters
| Name | Type | Description | 
|---|---|---|
| -ResourceGroupName | String | Specifies the name of the resource group to which the virtual machine scale set belongs. | 
| -VMScaleSetName | String | Specifies the name for the virtual machine scale set. | 
| -VirtualMachineScaleSetType | String | Specifies the type of the virtual machine scale set. Possible values are "AvailabilitySet" and "VirtualMachineScaleSet". | 
| -ImageReferenceSku | String | Specifies the SKU of the image. | 
| -ImageReferenceOffer | String | Specifies the offer of the image. | 
| -ImageReferencePublisher | String | Specifies the publisher of the image. | 
| -ImageReferenceVersion | String | Specifies the version of the image. | 
| -Credential | PSCredential | Specifies a user account that has permission to perform this action. | 
| -Size | String | Specifies the size of the virtual machines in the scale set. | 
| -MaxInstanceCount | Int32 | Specifies the maximum number of virtual machine instances in the scale set. | 
| -UpgradePolicyMode | String | Specifies the upgrade policy mode for the scale set. Possible values are "Automatic" and "Manual". | 
Example
New-AzVmss -ResourceGroupName "MyResourceGroup" -VMScaleSetName "MyVmss" -ImageReferencePublisher "MicrosoftWindowsServer" -ImageReferenceOffer "WindowsServer" -ImageReferenceSku "2016-Datacenter" -MaxInstanceCount 5 -UpgradePolicyMode "Manual"Inputs and Outputs
The input type is the name of the parameters to this cmdlet.
The return type is the name of the mapped parameters to this cmdlet.
Notes
This cmdlet is part of the Azure Compute PowerShell module. To use it, you need to install and import the module.
