Metasploit | Penetration Testing Software, Pen Testing Security | Metasploit

Fist you will need to start mfconsole

mfconsole

Search for an exploit

search exploit <expoit-name>

Example:

search exploit eternalblue

Use an exploit

use <exploit-path>

Example:

use exploit/windows/smb/ms17_010_psexec

Show the options of an exploit

show options

Set an exploit option

set <option> <value>

Example:

set LHOST 127.0.0.1

Check if a server is vulnerable

check