-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Test-Connection: Increase output detail when performing a tcp test #11452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test-Connection: Increase output detail when performing a tcp test #11452
Conversation
…o TestConnection-AddVerboseTcpTest
vexx32
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work here!
A few minor things I think we should address but on the whole this looks like a great improvement 😊
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
vexx32
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple smaller things I noticed on a re-read. 🙂
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Management/commands/management/TestConnectionCommand.cs
Outdated
Show resolved
Hide resolved
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@SteveL-MSFT Thank you for the update! I've made the changes to implement the parameter sets you've described. As mentioned, the default return with Please let me know if these changes align with what's expected 😁 |
|
Commenting to bump, is there anything else required to merge these changes? I'm very excited to move things forward! |
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
/azp run PowerShell-CI-windows |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@TravisEz13 The documentation for this cmdlet needs to be updated. Please file a docs issue. |
|
🎉 Handy links: |
Test-Connection: Increase output detail when performing a tcp test
These changes provide more detail when using
Test-Connectioncmdlet with the-TCPPortoption. This will provide functionality more in line with the ping test, and the classicTest-NetConnectioncmdlet.Currently, the returned value when performing this test is a boolean true / false. This provides some insight into if the connection was successful but not much else.
Here's the current output:
Here is an example of the same command, with the changes:
The
-Countand-Repeatoptions are also implemented, as seen below:To provide a boolean output, the
-Quietoption is used:Most of the code changes are implementing a new TcpTestStatus class to facilitate the output. A few changes to existing code to implement the existing switches.
PR Context
This opens up a lot more functionality with
Test-Connectionwhen working with TCP. Often, while working on connectivity issues, we need more detail than just if the connection is established, or not.These changes should provide much of the fundamental TCP functionality from the classic
Test-NetConnection.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.Fix: #11440