This feature is called hosted networks. On a Wi-Fi enabled computer running Windows 7 or later, use the following commands in an elevated command prompt:
netsh wlan set hostednetwork mode=MODE ssid=SSID key=KEY keyusage=KEYUSAGE
Changes access point settings.
mode can be
disallow, specifying whether the access point is enabled.
ssid is the name of the network;
key is the encryption key used for accessing the network.
keyusage can be
temporary, indicating whether the key is kept or discarded after one use (the default is
persistent). Note that WPA2-AES is used.
netsh wlan start hostednetwork
Starts the access point.
netsh wlan stop hostednetwork
Stops the access point.
netsh wlan show hostednetwork
Shows the status of the access point.
To allow Internet access through the access point, open the properties for the adapter that provides the Internet connection under Change adapter settings in the Network and Sharing Center, then enable Internet Connection Sharing to the Microsoft Virtual WiFi Miniport Adapter that is providing the wireless connection, usually Wireless Network Connection 2.
Note that the access point created using this procedure uses infrastructure mode. For more information and technical details about hosted networks, see http://msdn.microsoft.com/en-us/library/windows/desktop/dd815243%28v=vs.85%29.aspx.