Add-AzVmssSkuProfileVMSize
Add a VM size into VMSS Sku Profile for VMSS Instance Mix.
Syntax
Add-AzVmssSkuProfileVMSize
[-VirtualMachineScaleSet] <PSVirtualMachineScaleSet>
[-VmSize] <String>
[[-Rank] <Int32>]
[[-AllocationStrategy] <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Add a VM size into VMSS Sku Profile for VMSS Instance Mix.
Examples
Example 1
$vmss = Get-AzVmss -ResourceGroupName $rgname -Name $vmssName
Add-AzVmssSkuProfileVMSize -VirtualMachineScaleSet $vmss -VmSize "Standard_D4s_v4" -Rank 1;
Retrieve the VMSS and add a new VM size "Standard_D4s_v4" with rank 1 to the VMSS.
Parameters
-AllocationStrategy
LowestPrice, CapacityOptimized, or Prioritized
Type: | String |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Rank
Between 0 and the number of VM sizes in the Sku Profile
Type: | Int32 |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VirtualMachineScaleSet
VMSS object
Type: | PSVirtualMachineScaleSet |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VmSize
Valid VM size
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]