Set-AzDtlAutoStartPolicy
Sets the auto start policy of a lab in DevTest Labs.
Syntax
Enable (Default)
Set-AzDtlAutoStartPolicy
[[-Time] <DateTime>]
[[-Days] <DayOfWeek[]>]
[-LabName] <String>
[-ResourceGroupName] <String>
[-Enable]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Disable
Set-AzDtlAutoStartPolicy
[[-Time] <DateTime>]
[[-Days] <DayOfWeek[]>]
[-LabName] <String>
[-ResourceGroupName] <String>
[-Disable]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzDtlAutoStartPolicy cmdlet sets the auto start policy of a lab, which allows lab virtual machines to be scheduled for automatic start.
The cmdlet uses the specified resource group and name of the lab to set the policy.
Examples
Example 1
Sets the auto start policy of a lab in DevTest Labs. (autogenerated)
Set-AzDtlAutoStartPolicy -Days Sunday -Enable -LabName <String> -ResourceGroupName MyResourceGroup -Time <DateTime>
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Days
Specifies, as an array, the days of the week for when the virtual machines of the lab must be started.
Parameter properties
Type: DayOfWeek [ ]
Default value: None
Accepted values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 5
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Disable
Indicates that this cmdlet disables the policy for the virtual machines in the lab.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Disable
Position: 3
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Enable
Indicates that this cmdlet enables the policy for the virtual machines in the lab.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Enable
Position: 2
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-LabName
Specifies the name of the lab for which this cmdlet sets the automatic start policy.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceGroupName
Specifies the name of the resource group that the lab belongs to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Time
Specifies the time when the virtual machines of the lab must be started.
Parameter properties
Parameter sets
(All)
Position: 4
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs