Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

Powershell script welches automatisch eine Wlan Verbindung herstellt.

$
0
0

Wie im Titel schon schlecht umschrieben, versuche ich ein Powershell script zu schreiben welches sich sobald man es ausführt im Wlan anmeldet. Ein Beispiel: Ich habe einen neuen Laptop und möchte das wenn ich dass Script starte dieses den Laptop mit dem Wlannetz verbindet, mit automatischer Passwort eingabe usw. Sprich komplett automatisch. Hat da wer ne Idee oder im besten Fall schon nen fertiges script?

Das einzige was ich bis jetzt geschafft habe, war ein YouTube Video nach zu basteln, man lässt sich das Wlan Profil als xml ausgeben, schreibt dann eine ps1 mit folgendem Inhalt: netsh wlan add profile filename="$PSScriptRoot\Name der xml datei.xml 

und eine bat mit folgendem Inhalt:

 @ECHO OFF

PowerShell.exe -NoProfile -Command "& {Start-Process PowerShell.exe -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%~dpn0.ps1""' -Verb RunAs}"
exit

Gebracht hat mir das aber nichts :0

LG
EinHilfloserITler



Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>