I’ve been looking to some PowerShell script written by Microsoft to diagnose connectivity issues with Microsoft Defender for Endpoint (MDE) and found a little gem in the code:
I’ve written a function for that:
This .Net object is very promising and has many methods compared to what you get when use the built-in Get-NetConnectionProfile cmdlet that uses WMI.
You can for example find how many signal bars you’ve on your Wireless card:
$null = [Windows.Networking.Connectivity.NetworkInformation, Windows, ContentType = WindowsRuntime]
$connectionProfile = [Windows.Networking.Connectivity.NetworkInformation]::GetInternetConnectionProfile() $connectionProfile.GetSignalBars()
Awesome isn’t?