Closed maximilianpalm closed 1 week ago
Thanks for the issue! I believe this module comes with Windows/windows PowerShell, this repo is only for PowerShell 7 issues and modules that are inbox with that specific version. I suggest submitting feedback on this via the product feedback hub, https://support.microsoft.com/en-us/windows/send-feedback-to-microsoft-with-the-feedback-hub-app-f59187f8-8739-22d6-ba93-f66612949332
Learn how to use Feedback Hub to report problems or send suggestions to Microsoft.
This issue has been marked as external and has not had any activity for 1 day. It has been be closed for housekeeping purposes.
📣 Hey @maximilianpalm, how did we do? We would love to hear your feedback with the link below! 🗣️
🔗 https://aka.ms/PSRepoFeedback
Summary of the new feature / enhancement
As a user, I want Test-NetConnection to print the specific error that happened during a connection attempt, so that I can narrow down the source or type of connection issue.
Currently, when checking if a TCP port is open on a remote machine using Test-NetConnection, I can see if the connection was established successfully or not. If it wasn't, I don't get information on the kind of error that happened. It would be useful to know whether the connection attempt failed e.g. because of a timeout or because the connection was refused by the target machine. The former might indicate a firewall is dropping packets while the latter one might suggest that the application isn't running on the target machine. This enables me locate the issue easier and faster.
I'd hope to see this implemented in Test-NetConnection, because for me this is by far the most common use case for this cmdlet. Otherwise, I have to resort to other tools or more complicated scripts just to get a piece of information that Test-NetConnection already has. It just needs to print it for the user.
Proposed technical implementation details (optional)
Usage Example (current state):
Usage Example (desired state, see warning and additional line at the end):