Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another Issue with Wi-Fi interface not found on the system #35

Open
adamsewell opened this issue May 6, 2023 · 2 comments
Open

Another Issue with Wi-Fi interface not found on the system #35

adamsewell opened this issue May 6, 2023 · 2 comments

Comments

@adamsewell
Copy link

I'm experiencing a similar issue that was described in #31 but I'm not having any WMI issues. Is this a bug? I appreciate any help!

PS C:\> New-WiFiProfile -ProfileName $ssid -ConnectionMode auto -Authentication WPA2PSK -Encryption AES -Password $ssid_psk
New-WiFiProfile : Wi-Fi interface not found on the system.
At line:1 char:1
+ New-WiFiProfile -ProfileName $ssid -ConnectionMode auto -Authenticati ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-WiFiProfile

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.2364
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.2364
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Get-NetAdapter

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Local Area Connection 2   Viscosity Virtual Adapter V9.1               16 Not Present  00-FF-BE-8A-AB-32          0 bps
Wireless Network Conne... Intel(R) Dual Band Wireless-AC 3165          15 Up           E0-94-67-A7-F6-20      72.2 Mbps
Local Area Connection     Intel(R) Ethernet Connection I219-V          11 Disconnected 50-7B-9D-95-00-A7          0 bps
Local Area Connection 3   Viscosity Virtual Adapter V9.1 #2             8 Not Present  00-FF-69-65-94-58          0 bps
Bluetooth Network Conn... Bluetooth Device (Personal Area Netw...       6 Disconnected E0-94-67-A7-F6-24         3 Mbps

Get-NetAdapter -Name 'Wireless Network Connection' | fl

Name                       : Wireless Network Connection
InterfaceDescription       : Intel(R) Dual Band Wireless-AC 3165
InterfaceIndex             : 15
MacAddress                 : E0-94-67-A7-F6-20
MediaType                  : Native 802.11
PhysicalMediaType          : Native 802.11
InterfaceOperationalStatus : Up
AdminStatus                : Up
LinkSpeed(Mbps)            : 72.2
MediaConnectionState       : Connected
ConnectorPresent           : True
DriverInformation          : Driver Date 2022-02-20 Version 19.51.40.1 NDIS 6.60
@krzydoug
Copy link

krzydoug commented May 30, 2023

Hello,

Could you run the following commands to investigate?

$ErrorActionPreference = 'Stop'

try{
    Import-Module wifiprofilemanagement -Force
    . (Get-Module wifiprofilemanagement) { $Host.EnterNestedPrompt() }
    $interfaceListPtr = 0
    $clientHandle = New-WiFiHandle
    [WiFi.ProfileManagement]::WlanEnumInterfaces($clientHandle, [IntPtr]::zero, [ref] $interfaceListPtr) | Out-Null
    $wiFiInterfaceList = [WiFi.ProfileManagement+WLAN_INTERFACE_INFO_LIST]::new($interfaceListPtr)
    $wiFiInterfaceList 
    exit
}
catch{
    Write-Warning $_.Exception.Message
}

This will enter the module's scope so we can utilize the underlying classes and query for the interface ourselves. I assume $wifiinterfacelist will be blank based on your issue, but we may see errors that can tell us why.

@kpestalozzi
Copy link

I've got the same error when running set-wifiprofile and new-wifiprofile. Get-wifiprofile works fine.

Name                           Value
----                           -----
PSVersion                      5.1.22621.2506
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.2506
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
WLAN                      Intel(R) Wi-Fi 6E AX211 160MHz               29 Up           00-D4-9E-DA-85-A9        65 Mbps

@krzydoug i've run your commands but I just get an empty $wifiinterfacelist , no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants