Set WiFi – ConfigMgr OSD – PowerShell

I’ve wanted to automatically set WiFi on my devices so after OSD, I can disconnect and walk off without having to manually connect. I’m using WPA2 PSK WiFi at home in my LAB, and finally got around to adding it into OSD. I found this method [Blog Post] to be quite simple, so this is what I went with, thank you Kelvin Tegelaar for this.

I basically just turned that into a function, and added it into the OSD module, (Powers OSDCloud), a project I use quite a bit, and have leveraged it to assist with imaging devices from a Flash Drive that aren’t connected via Ethernet, but once in the Full OS are able to connect automatically via WiFi.

Building on that, I wanted to use it in my own lab to have my devices connect to WiFi after OSD.

First I add the details as variables. I create a variable called SSID, and set that to my WiFi Name, which happens to be “Lab-WiFi” (Case Sensitive).

I then create a “secret” variable with the password.

Near the end of the process, I run the PowerShell Script [GitHub], with the parameters to connect to WiFi

The Script first checks for the presence of WiFi adapters before trying to apply the WiFi profile.

No place in the SMSTS log does it show the SSID or Password values.

Then after OSD as soon as I disconnect the ethernet cable, it automatically connects to WiFi

GARYTOWN.COM

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.