Set-AzVMZoneMovement
Sets the ZoneMovement configuration on a PSVirtualMachine object.
Syntax
Default (Default)
Set-AzVMZoneMovement
[-VM] <PSVirtualMachine>
[-IsEnabled] <Boolean>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzVMZoneMovement cmdlet updates the zone movement setting on a virtual machine model object.
Examples
Example 1
$vm = Get-AzVM -ResourceGroupName "rg1" -Name "myVM"
$vm = Set-AzVMZoneMovement -VM $vm -IsEnabled $true
Update-AzVM -ResourceGroupName "rg1" -VM $vm
This command enables zone movement on the VM model and persists it to Azure by using Update-AzVM.
Parameters
-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 |
-IsEnabled
Specifies whether zone movement is enabled.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-VM
The virtual machine profile.
Parameter properties
| Type: | PSVirtualMachine |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | VMProfile |
Parameter sets
(All)
| Position: | 0 |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| 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.