Export & Import Wireless Network Info on Windows machines

https://community.spiceworks.com/how_to/24989-export-import-wireless-network-info-on-windows-machines

Create a batch file and add it to the GPO.
This Batch file checks if the name exist. If not, WLAN will be created.

@echo off
netsh wlan show profiles | find /i "<Wifi-Name>" 
if errorlevel 1 ( 
netsh wlan add profile filename="\\<DOMAIN>\NETLOGON\<XMLNAME>" user=all
) 

 

Add SSTP VPN connection via Powershell

At the custommer I needed to add SSTP VPN to all the laptops via GPO. But SSTP vpn profile can’t ¬†be created in GPO. So I looked further and found this at Microsoft¬†https://technet.microsoft.com/itpro/powershell/windows/vpnclient/add-vpnconnection

Now I created this powershell script

Add-VpnConnection -Name "<CONNECTION NAME>" -ServerAddress "<SERVER OR PUBLIC IP>" -TunnelType "Sstp" -EncryptionLevel "Required" -AuthenticationMethod MSChapv2 -UseWinlogonCredential -AllUserConnection -RememberCredential -PassThru

Add it to a GPO and the SSTP VPN connection is created.