Skip to content
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

Get-NetTCPConnection not reporting ports correctly #3277

Open
3 tasks done
ryanhdake opened this issue Mar 14, 2023 · 1 comment
Open
3 tasks done

Get-NetTCPConnection not reporting ports correctly #3277

ryanhdake opened this issue Mar 14, 2023 · 1 comment
Assignees
Labels
issue-doc-bug Something is out of date, unclear, confusing, or broken in the article. Blocks customer success. needs-triage Waiting - Needs triage

Comments

@ryanhdake
Copy link

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in Get-Foo cmdlet" instead of "Typo."
  • Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.

Links

https://github.com/MicrosoftDocs/windows-powershell-docs/blob/main/docset/winserver2016-ps/nettcpip/Get-NetTCPConnection.md

Summary

Running Get-NetTCPConnection not reporting all ports correctly. Found 2 machines that report that ports 80 and 443 are only listening on IPv6 when they are in fact listening on IPv4 and IPv6. This was confirmed by bindings in IIS and netstat.

Details

I am using this to test ports on a webserver automatically.
Running netstat -ano | findstr /i ":80 :443" | findstr /i listening | findstr /v "::" reports that the ports are open for IPv4 - this is correct

image

When running get-nettcpconnection | where {$_.localport -eq "80" -or $_.localport -eq "443" -and $_.state -eq "Listen"} reports only the IPv6 ports are open.

image

I have verified these results by running get-nettcpconnection | where {$_.state -eq "listen"} | sort localport
port 135 is reporting for IPv4 and IPv6 but 80 and 443 dont.

image

Suggested Fix

No response

@ryanhdake ryanhdake added issue-doc-bug Something is out of date, unclear, confusing, or broken in the article. Blocks customer success. needs-triage Waiting - Needs triage labels Mar 14, 2023
@scanum scanum self-assigned this Mar 17, 2023
@officedocspr5
Copy link
Collaborator

To make it easier for you to submit feedback on articles on learn.microsoft.com, we're transitioning our feedback system from GitHub Issues to a new experience.

As part of the transition, this GitHub Issue will be moved to a private repository. We're moving Issues to another repository so we can continue working on Issues that were open at the time of the transition. When this Issue is moved, you'll no longer be able to access it.

If you want to provide additional information before this Issue is moved, please update this Issue before December 15th, 2023.

With the new experience, you no longer need to sign in to GitHub to enter and submit your feedback. Instead, you can choose directly on each article's page whether the article was helpful. Then you can then choose one or more reasons for your feedback and optionally provide additional context before you select Submit.

Here's what the new experience looks like.

Note: The new experience is being rolled out across learn.microsoft.com in phases. If you don't see the new experience on an article, please check back later.

First, select whether the article was helpful:

Image showing a dialog asking if the article was helpful with yes and no answers.

Then, choose at least one reason for your feedback and optionally provide additional details about your feedback:

Article was helpful Article was unhelpful
Image showing a dialog asking how the article was helpful with several options. Image showing a dialog asking how the article wasn't helpful with several options.

Finally, select Submit and you're done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue-doc-bug Something is out of date, unclear, confusing, or broken in the article. Blocks customer success. needs-triage Waiting - Needs triage
Projects
None yet
Development

No branches or pull requests

3 participants