List of Layers

How to get list of layers in a drawing in command window?