Is it possible to capture screenshots in headless (no graphics) mode in unity?

Is it possible to capture screenshots in headless (no graphics) mode in unity?

I am trying to capture screenshots while running unity simulation in headless mode (no graphics), if anybody tried to do the same and it worked, please share how could you make it work.

Solutions/Answers:

References