The smb_version scanner connects to each workstation in a given range of hosts and determines the version of the SMB service that is running.
It display version information about each system.
It assumes that you already have MetaSploit installed, or that you are running Kali / backtrack Linux. if not Installed,you can download from here https://www.metasploit.com/
Step 1 : Open MetaSploit with msfconsole command
Step 2 : Search smb_version
Step 3 :
use auxiliary/scanner/smb/smb_version
options
Step 4 :
set rhosts 192.168.18.129 [Target I.P]
run
Step 5 : You have Successfully get the details of target system using smb version scanning with metasploit.