The procedure outlined here makes use of Windows’ native Network Shell utility, deploying the wlan command within the utility to enable a hosted network that will, in turn, serve as your ad hoc connection. If all this sounds daunting, fret not, for the actual procedure is fairly easy. Follow the steps outlined below, and you should be good to go.
Step 1: Launch an elevated command prompt under Windows 8 (one with administrator privileges).
Step 2: Run the following command to verify that your network interface supports
netsh wlan show drivers
If Hosted network supported says Yes, you’re all set. Otherwise, you need to upgrade your hardware, if the software update doesn’t fix it.
Step 3: Now, set up the ad hoc wireless network using this command. Replace the parts in markup tags with your own choices
netsh wlan set hostednetwork mode=allow ssid=<enter_network_name_here> key=<enter_password_here>
Step 4: Until now, your hosted network has been created. Now, you need to start it. Use the command below:
netsh wlan start hostednetwork
Step 5: You’re all set, with just one thing remaining. If it’s not already enabled, you need to allow Internet Connection Sharing (ICS) for your currently-active internet connection. Simply head over to Network & Sharing Center, and in the properties for the current internet connection, enable ICS. Make sure to select the ad hoc connection under Home networking connection.
Now you can connect any device to the internet using the ad hoc wireless network with internet connection sharing that you just created on your Windows 8 PC.