Report of all media in the autoloader



I need to create a report every Monday morning of all the physical tapes that are in all of the slots of the autoloader devices with certail details. The manual steps that I need to do is as following. I start with the list of media that are in the 8 slots of the two autoloaders, then I select each tape and select the object tab and get all the session ID's and if the session was a full backup or an incremental.


What I would like is to do is create a script or report to extract a list of the media that is in each device and get the list of obects and write it to a file that I can use in Excel.


I have tried to extract some of the data using CLI commands but not successfully. Any guidance will be gratly appreciated.