How to retrieve information using the cmd command