Removing floppy drive from Azure Windows 10 VM

Recently I need to use the Azure VM to do some automated tests, and ran into an issue caused by the floppy drive. Surprisingly, all Azure Windows 10 VMs come with the floppy drive by default, according to Microsoft support.

https://social.msdn.microsoft.com/Forums/en-US/95c43807-8017-4637-8e3a-0ffb482f34d8/why-floppy-disk-drive-or-cddvd-drive-in-azure-vms?forum=WAVirtualMachinesforWindows

By looking it up in Google, I found a useful link to remove the floppy drive using a powershell command on Windows 10.

Get-PnpDevice -Class FloppyDisk | Disable-PnpDevice -Confirm:$false

https://peter.hahndorf.eu/blog/DisableFloppyDrive.html

After running this command, I saved the OS image and and used it to start up the VMs, then I am able to get Windows 10 VMs without the floppy drive.