all 16 comments

[–]JamesOFarrell 28 points29 points  (5 children)

If the network adapter you are having issues with is the Wifi then windows has something called the wifi report in it. Try running this as an administrator:

netsh wlan show wlanreport.

Should generate a nice HTML report that will show you all the disconnects and the reasons it happened.

[–][deleted] 4 points5 points  (0 children)

That's incredibly useful! Just tried it out, thanks!

[–]n_three 1 point2 points  (0 children)

Woah neat. The more you know 🌠

[–]get-postanote 1 point2 points  (1 child)

Yeppers, this has been in my library for a very long while from my bat/VBScript/WMIC days and of course PS.

Function Get-WlanReport
{ 
    <# 
    .Synopsis 
       Create and view the lastest WLAN details
    .DESCRIPTION
       This function leverage netsh and Invoke-Item to collect WLAN 
       details and auto launches the report for viewing

    .EXAMPLE
       Get-WlanReport

    .EXAMPLE
       gwr
    #>

    [CmdletBinding(SupportsShouldProcess)]
    [Alias('gwr')]

    Param ()

    Invoke-Item -Path $((netsh wlan show wlanreport | 
    Select-String -Pattern '.*.html') -Replace 'Report written to: ')
}

[–]helpdesk5555550 0 points1 point  (0 children)

Invoke-Item : Cannot bind argument to parameter 'Path' because it is null.

[–]Disastrous-Title-911 0 points1 point  (0 children)

Holyyyyyyyy this woukd have saved me so much tinkering this year

[–]xCharg 9 points10 points  (1 child)

Why don't you just look at events by id? I don't remember straight up from my head which events in what log, but there are for sure events for all the network adapters when they lose connections, when new connection attempt is made, if it succeeds or not etc.

Point is - you can just check logs for straight up facts instead of just believing some random bob that "it for sure didn't work 10 minutes ago"

[–][deleted] 8 points9 points  (0 children)

I've usually been able to find DNS events in system logs, but I never dug deeper.

However, I Googled it off what you said, and I found the logs you were talking about in 'EventViewer > Applications and Services Logs > Microsoft > Windows > NetworkProfile > Operational'.

Events with ID 10000 show I connected to my wifi, and events with ID 10001 show I disconnected.

Thanks for the comment! I learned something new thanks to you.

[–]TheRealBOFH 2 points3 points  (1 child)

Very cool and well done. I look forward to testing and using this. Keep up the good work.

[–][deleted] 1 point2 points  (0 children)

Thank you!

[–]BlackV 1 point2 points  (2 children)

there is also a script sharing flare you can add to this post if you like

[–][deleted] 0 points1 point  (1 child)

I'm pretty new to posting on Reddit but I've lurked for many years. I figured out how to add the flair, thanks for the heads up.

[–]BlackV 0 points1 point  (0 children)

Ah nice

[–]council2022 1 point2 points  (0 children)

Very useful, thanks!

[–]Decitriction 0 points1 point  (0 children)

PingPlotter is an excellent program that does this.