Create Hotspot-WiFi on windows using cmd

Open command prompt (cmd) as administrator.
In command prompt type as follows:
1. C:\Windows\system32> netsh wlan set hos mode=allow ssid=name key=password
2. C:\Windows\system32> netsh wlan start hostednetwork
OR 
To make it easy you can write instead of above line
2. C:\Windows\system32> netsh wlan st hos
3. C:\Windows\system32> netsh wlan stop hosted
4. C:\Windows\system32> netsh wlan show hosted setting=security