Metasploit | Penetration Testing Software, Pen Testing Security | Metasploit
Fist you will need to start mfconsole
mfconsole
search exploit <expoit-name>
Example:
search exploit eternalblue
use <exploit-path>
Example:
use exploit/windows/smb/ms17_010_psexec
show options
set <option> <value>
Example:
set LHOST 127.0.0.1
check