possibly there is a script already here for this, i didn’t see one. i would like to push pre-defined wireless network info to endpoints. windows 7 or higher 32/64. thus allowing them to connect to pre configured access point
script can set
3.network sec key
office x has ap name : xray with key: xyz123 + sec type wpa 2 personal + encry type aes
we can push ssid: xray and key: xyz123 + sec type wpa 2 personal + encry type aes (to our mobile devices group)
having the switch /connect automatically when this network is in range (handy)
I personally think this would be handy for deployment and re configuration scenarios in general.
Sure, we will look into your request and update you shortly.
We can add a wireless network to the system using import/export profile option available in the windows OS.
- Initially, you should export desired wireless network profile from configured system to network or share path. Please try below command with administrator privilege to achieve it,
netsh wlan show profiles - Shows list of wireless profile available in the system
netsh wlan export profile name=“profile-name” folder=“networkpath” - Export wireless profile to mentioned folder path
sample network or share path is “\fileserver.net\Common
sample wireless profile is “Wi-Fi”
Now, you can see exported XML file in the network/shared path. Example Wireless Network connection-“profile-name”.xml
Finally, run below script with the correct profile_path variable.
etwork\Wireless Network Connection-home-network.xml"
_disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirection
_revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirection
self.old_value = ctypes.c_long()
self.success = self._disable(ctypes.byref(self.old_value))
def __exit__(self, type, value, traceback):
print os.popen('netsh wlan add profile filename="'+profile_path+'" user=all').read()
print os.popen('netsh wlan show profiles').read()
Let us know your feedback.