Disable-AzVMDiskEncryption
Disables encryption on an IaaS virtual machine.
Syntax
Default (Default)
Disable-AzVMDiskEncryption
[-ResourceGroupName] <String>
[-VMName] <String>
[[-VolumeType] <String>]
[[-Name] <String>]
[[-TypeHandlerVersion] <String>]
[-Force]
[-DisableAutoUpgradeMinorVersion]
[-ExtensionType <String>]
[-ExtensionPublisherName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Disable-AzVMDiskEncryption cmdlet disables encryption on an infrastructure as a service (IaaS) virtual machine.
This cmdlet is only supported on Windows virtual machines and not Linux virtual machines.
This cmdlet installs an extension on the virtual machine to disable encryption.
If the Name parameter is not specified, an extension with the default name "AzureDiskEncryption for Windows VMs" is created.
Caution: This cmdlet reboots the virtual machine.
Examples
Example 1: Disable encryption for all volumes on a Windows virtual machine
Disable-AzVMDiskEncryption -ResourceGroupName "Group001" -VMName "VM002"
This command disables encryption for volumes of type all for the virtual machine named VM002 that belongs to the resource group named Group001.
Since the VolumeType parameter is not specified, the cmdlet sets the value to All.
Example 2: Disable encryption for data volumes on a Windows virtual machine
$ResourceGroup = "Group002"
$VMName = "VM004"
$VolumeType = "Data"
Disable-AzVMDiskEncryption -ResourceGroupName $ResourceGroup -VMName $VMName -VolumeType $VolumeType
This command disables encryption for volumes of type data for the virtual machine named VM004 that belongs to the resource group named Group002.
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
-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
-DisableAutoUpgradeMinorVersion
Indicates that this cmdlet disables auto-upgrade of the minor version of the extension.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ExtensionPublisherName
The extension publisher name. Specify this parameter only to override the default value of "Microsoft.Azure.Security".
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ExtensionType
The extension type. Specify this parameter to override its default value of "AzureDiskEncryption" for Windows VMs and "AzureDiskEncryptionForLinux" for Linux VMs.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Specifies the name of the Azure Resource Manager (ARM) resource that represents the extension.
If this parameter is not specified, this cmdlet defaults to "AzureDiskEncryption for Windows VMs".
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ExtensionName
Parameter sets
(All)
Position: 3
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ResourceGroupName
Specifies the resource group name of the virtual machine.
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
-TypeHandlerVersion
Specifies the version of the encryption extension.
If you do not specify a value for this parameter, the latest version of the extension is used.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: HandlerVersion, Version
Parameter sets
(All)
Position: 4
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-VMName
Specifies the name of the virtual machine that this cmdlet disables encryption on.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ResourceName
Parameter sets
(All)
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-VolumeType
Specifies the type of virtual machine volumes to perform the encryption operation.
For Windows virtual machines, valid values are:
All
OS
Data.
If you do not specify a value for this parameter, the default value is All.
Disable encryption is not currently supported for Linux.
Parameter properties
Type: String
Default value: None
Accepted values: OS, Data, All
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 2
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
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