Query a commands icon?

Hi
Does anyone know how to find out the icon a particular command uses? When many menu commands are dropped onto the shelf it automatically links it to the correct icon so the info must be stored somewhere. Any idea how to access it?

Thanks
Dave

Found it!

menuItem -q -image;