Virtualbox: How can I add (mount) a ISO image file from command-line?

Dime time ago there was in VirtualBox command-line a command with this syntax:

VBoxManage controlvm <VM> dvdattach <filename>

So attaching (inserting) a CD/DVD was as easy as:

VBoxManage controlvm "MyVM Windows 7" dvdattach MyDVD.iso

But now this command has disappeared.
I have been browsing the VirtualBox Manual and all I have found is some storageattach command, that refers to some other storagectl who is not concise enough (I hate docs without examples), none of them refering to something like .ISO files.
I have not been able to find a solution on its own forum, at least nothing going farther than ambiguous and not concise explanations:

Once you have the controller in place with storagectl (or via theGUI), take a look at VBoxManage storageattach

Instead of starting to randomly test options, I prefer to ask first here if someone has succeeded to make this, and could give me some help.

Solution:

Manage the IDE controller

In case the VM doesn’t have an IDE controller you can use the storagectl command to add one:

VBoxManage.exe storagectl "<uuid|vmname>" --name IDE --add ide

Attach a disk image file

Here’s a sample syntax you can use to attach a CD/DVD image file:

VBoxManage.exe storageattach "<uuid|vmname>" --storagectl IDE --port 0 --device 0 --type dvddrive --medium "X:Foldercontainingthe.iso"

Detach a disk image file

To detach an image file the syntax is similar: you just need to replace the file path with "none". The --type parameter can be omitted:

VBoxManage.exe storageattach "<uuid|vmname>" --storagectl IDE --port 0 --device 0 --medium "none"

Further reading