Set-​Azure​Rm​Dtl​Allowed​VM​Sizes​Policy

Sets the allowed virtual machine sizes policy of a lab in DevTest Labs.

Syntax

Set-AzureRmDtlAllowedVMSizesPolicy
   [-LabName] <String>
   [-ResourceGroupName] <String>
   [-Disable]
   [[-VmSizes] <String[]>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Set-AzureRmDtlAllowedVMSizesPolicy
   [-LabName] <String>
   [-ResourceGroupName] <String>
   [-Enable]
   [[-VmSizes] <String[]>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The Set-AzureRmDtlAllowedVMSizesPolicy cmdlet sets the allowed virtual machine sizes policy, which specifies a list of virtual machine sizes allowed in a lab. The cmdlet uses the specified resource group and name of the lab to set the policy.

Examples

1:

Required Parameters

-Disable

Indicates that this cmdlet disables the policy.

Type:SwitchParameter
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LabName

Specifies the name of the lab for which this cmdlet sets the virtual machine sizes policy.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group that the lab belongs to.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Enable

Indicates that this cmdlet enables the policy.

Type:SwitchParameter
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VmSizes

Specifies, as a string array, the list of virtual machine sizes allowed in the lab.

Type:String[]
Position:4
Default value:None
Accept pipeline input:False
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:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.DevTestLabs.Models.PSPolicy

This cmdlet returns the policy that specifies the list of virtual machine sizes allowed in the lab.