Windows 11 and a PowerShell module

12 views
Skip to first unread message

Kurt Buff

unread,
Dec 22, 2025, 2:01:28 PM (8 days ago) Dec 22
to ntsys...@googlegroups.com
All,

I've been using wifitools for quite a while, but it seems to have stopped working under 24H2.

I don't know if it's because my two laptops are fubared or because 24H2 has changed things.

I've tried uninstalling and reinstalling, but when I try the cmdlet Scan-WifiAPs, I get the following - yes, in an elevated ssession:

scan-wifiaps
New-Object : Exception calling ".ctor" with "0" argument(s): "Access is denied"
At C:\Program Files\WindowsPowerShell\Modules\wifitools\1.8.4\WifiTools.ps1:1798 char:17
+         $wificlient = New-Object NativeWifi.WlanClient
+                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

Is anyone else using this tool and having success under 24H2?

Kurt

Michael B. Smith

unread,
Dec 22, 2025, 5:03:59 PM (8 days ago) Dec 22
to ntsys...@googlegroups.com

I don’t use it, but that method is pretty simple:

 

                              public WlanClient()

                              {

                                             Wlan.ThrowIfError(

                                                            Wlan.WlanOpenHandle(Wlan.WLAN_CLIENT_VERSION_XP_SP2, IntPtr.Zero, out negotiatedVersion, out clientHandle));

                                             try

                                             {

                                                            Wlan.WlanNotificationSource prevSrc;

                                                            wlanNotificationCallback = OnWlanNotification;

                                                            Wlan.ThrowIfError(

                                                                           Wlan.WlanRegisterNotification(clientHandle, Wlan.WlanNotificationSource.All, false, wlanNotificationCallback, IntPtr.Zero, IntPtr.Zero, out prevSrc));

                                             }

                                             catch

                                             {

                                                            Close();

                                                            throw;

                                             }

                              }

 

Where is the dll stored? It might be that, as opposed to anything else…

--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntsysadmin+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntsysadmin/CADy1Ce7reTp_BF8tNdz%2Bv9rm%3DJyOYZuD9-m-8_PqTVTy0mqkgg%40mail.gmail.com.

Kurt Buff

unread,
Dec 22, 2025, 5:34:14 PM (8 days ago) Dec 22
to ntsys...@googlegroups.com
Not sure which one you mean, but I see two DLLs in 
C:\Program Files\WindowsPowerShell\Modules\WifiTools\1.8.4

ManagedWifi.dll (v1.0, dated 2022-06-10)
and
System.Runtime.WindowsRuntime.dll (v4.0.30319.17929 dated 2022-06-10
plus
WIFI-WPS.exe (v1.0.0.0 dated 2022-06-10)

Kurt

con...@cadzow.com.au

unread,
Dec 22, 2025, 5:54:17 PM (8 days ago) Dec 22
to ntsysadmin
There was a change in 24H2 where certain wifi APIs require location permissions: https://learn.microsoft.com/en-us/windows/win32/nativewifi/wi-fi-access-location-changes

In my world this mostly affected the use of netsh.exe

Geoff Vass

Kurt Buff

unread,
Dec 22, 2025, 6:20:36 PM (8 days ago) Dec 22
to ntsys...@googlegroups.com
That makes sense. I've seen similar with WPAD - an old CIS GPO setting broke the dependency between WinHTP and Wcmsvc. I had to revert that and change a different setting to stop it from breaking connectivity on some of our machies.

I've also seen that MSFT has inserted a warning/permission into 24H2 for Invoke-WebRequest, which is a bit annoying, because that module is used for API calls in one of my products.

I wonder how that might be fixed in WifiTools?

Kurt

Reply all
Reply to author
Forward
0 new messages