I was not able to do the keyscan successfully in my previous lab, now I found out the reason why.
meterpreter > getdesktop
The meterpreter is not in winsta0 and hence cannot capture the keystrokes of the victim.
explorer.exe has access to winsta0 api and hence is able to record the keystroke of the victim.
I will start the keylogging by using keyscan_start command
Mr. Vivek Ramachandra rocks! He explains the theory and logic behind every lesson. Do sign up for his certification program as a form of supporting his cause for providing free and quality infosec education.