Set-​Azure​Rm​Dtl​Auto​Shutdown​Policy

Sets the auto shutdown policy of a lab DevTest Labs.

Syntax

Set-AzureRmDtlAutoShutdownPolicy
   [-LabName] <String>
   [-ResourceGroupName] <String>
   [-Disable]
   [[-Time] <DateTime>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Set-AzureRmDtlAutoShutdownPolicy
   [-LabName] <String>
   [-ResourceGroupName] <String>
   [-Enable]
   [[-Time] <DateTime>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The Set-AzureRmDtlAutoShutdownPolicy cmdlet sets the auto shutdown policy of a lab, which automatically shuts down all the virtual machines in the lab at a specified time of the day. The cmdlet uses the specified resource group and name of the lab to set the policy.

Examples

1:

Required Parameters

-Disable

Indicates that the cmdlet disables the policy in the lab.

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 auto shutdown 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 the cmdlet enables the policy in the lab.

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

Specifies the time, as a DateTime object, for when the virtual machines in the lab must shut down.

Type:DateTime
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.PSSchedule

This cmdlet returns the schedule which specifies when the virtual machines in the lab must shut down.