I want to integrate the initiation of this troubleshooter into a python script.
I've found which lists various commands to open different Troubleshooters but the "Identify and Repair Network Problems" is nowhere to be found.
When there's a problem with the internet connection, clicking on the ethernet icon in the system tray opens this troubleshooter or you could open the same by searching "Identify and Repair Network Problems" in the search box of taskbar.
21 Answer
You can run the "Identify and Repair Network Problems" troubleshooter using this command line:
msdt -skip TRUE -path C:\Windows\diagnostics\system\networking -ep NetworkDiagnosticsConnectivityWhere -skip TRUE allows you to skip the first screen and go straight into the diagnostics.
or this one:
rundll32.exe,C:\Windows\system32\Rundll32.exe ndfapi,NdfRunDllDiagnoseIncidentIf you start the "Identify and Repair Network Problems" troubleshooter and then run wmic process where "caption='rundll32.exe' or caption='msdt.exe'" get /format:csv, you will notice something like the following:
Caption,CommandLine,ParentProcessId,ProcessId
rundll32.exe,C:\Windows\system32\Rundll32.exe ndfapi,NdfRunDllDiagnoseIncident,11088,10272
msdt.exe, -skip TRUE -path C:\Windows\diagnostics\system\networking -af C:\Users\<user>\AppData\Local\Temp\NDFBC7D.tmp -ep NetworkDiagnosticsConnectivity,10272,10528Based on that, clicking on the troubleshooter shortcut runs C:\Windows\system32\Rundll32.exe ndfapi,NdfRunDllDiagnoseIncident, which starts msdt.exe with an unusual command line that doesn't contain msdt.exe.
This command-line can't be run by itself. The NDFBC7D.tmp file seems to be created by the rundll32.exe process, so removing the -af switch solves that issue and allows you to run the troubleshooter without rundll32.exe.