Final answer:
The cmdlet to encrypt a managed disk in Azure is Set-AzureRmVMDiskEncryptionExtension, which enables encryption on VM disks using Azure Disk Encryption.
Step-by-step explanation:
The PowerShell cmdlet used to encrypt a managed disk in Azure is Set-AzureRmVMDiskEncryptionExtension. This cmdlet is intended for Azure virtual machine (VM) disks and allows you to set the disk encryption extension on an Azure VM. This will enable the encryption of the managed disks attached to the VM, using the Azure Disk Encryption feature. To use this cmdlet effectively, you will need to specify several parameters like the ResourceGroupName, the VMName, and the DiskEncryptionKeyVaultUrl, which is the URL of the Azure Key Vault where the encryption keys are stored.