OSDeploy / OSDCloud

OSDCloud is a process to fully deploy a Windows OS from a WinPE Environment
https://osdcloud.osdeploy.com
63 stars 14 forks source link

Wireless adapter detection #3

Open ChrisStro opened 3 years ago

ChrisStro commented 3 years ago

Wireless adapter detection on {$_.NetConnectionID -eq 'Wi-Fi'} is not realy reliable. i think it depends on regional settings in WinPE.

Maybe you could use a more "universal" expression like:

Get-CimInstance -ClassName Win32NetworkAdapter | Where-Object {$.servicename -match 'Netwtw'}

(works fine on my 5 test devices)

btw. awesome work!!!

OSDeploy commented 3 years ago

You are probably right about the Regional settings. I'll test and push out the changes. Thanks for catching this!

mike-sammons commented 3 years ago

Just re-testing the Wi-Fi detection in Public/WinREWiFi.ps1 and seeing an issue on Dell 5300, 7280 and 7285 Also seen on Surface Pro 7 @ChrisStro use of service name seems to do the trick on these 4 machines too

harris1m commented 2 years ago

I cannot get the wifi adapater to detect on any Dell laptops at present. All my test kit shares the Intel AX2xx driver. 5300, 5400, 5420, 7410. Have tried many ways of injecting the drivers. How do I test the detection above? Pointer's welcome.

loving OSDcloud. Only found it this week.

OSDeploy commented 2 years ago

Need more information. Did you build your WinPE from a WinRE? How did you add the Drivers? If you want to check while you are in WinPE, run MSINFO32

harris1m commented 2 years ago

Hi, yes building from WinRE template. I have installed drivers via -CloudDriver Dell,Wifi. I can see it pulls down the same driver i have downloaded from intel direct. I have also tried injecting direct into the boot.wim and created a fresh template.

I did find the modules in programfiles. I have just tried editing OSD.WinRE.WiFi.ps1. Test-Wifi Adapter section. Changed "Wi-FI" to "WiFI"

$WirelessNetworkAdapter = Get-WmiObject -ClassName Win32NetworkAdapter | Where-Object {$.NetConnectionID -eq 'WiFi'}

harris1m commented 2 years ago

Result! Now working. I was on the right track with the WMI query used in "OSD.WinRE.WiFi.ps1" and the "Test Wi-Wi Adapter" section. Our Dell's in the UK return a different value for the netconnection ID. "WiFi" rather than "Wi-Fi". Has to be edited a few times in the script. I just edited the boot.wim, copied in my edited OSD.WinRE.WiFi.ps1. Re-ran New-CloudIso and I now have working Wi-Fi. Great work,

"$WirelessNetworkAdapter = Get-WmiObject -ClassName Win32NetworkAdapter | Where-Object {($.NetConnectionID -eq 'Wi-Fi') -or ($_.NetConnectionID -eq 'wifi')}"

ChrisStro commented 2 years ago

The $_.NetConnectionID output differs between languages. Use en-us, not en-ga. You can change the input language when creating the wim, that should do the trick

harris1m commented 1 year ago

Thanks for the reply. Pretty sure i have tested en-US and en-GB. I will restest again and confirm. I have a workaround but if i can save having to remount the WIM to inject the updated powershell script, would save me some time.

woodyinwoodley commented 1 year ago

This is resolved in the latest OSD module. OSD.WinRE.WiFi.ps1 now looks for Wi-Fi or WiFi.