# Ports, Protocols, and Services

**URL:** <https://forums.powershell.org/t/ports-protocols-and-services/7430>\
**Category:** PowerShell Help\
**Created:** [October 28, 2016, 9:52am UTC](https://forums.powershell.org/t/ports-protocols-and-services/7430 "2016-10-28T09:52:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cnstgrad](https://avatars.discourse-cdn.com/v4/letter/c/bc8723/32.png) [@cnstgrad](https://forums.powershell.org/u/cnstgrad)\
**Post date:** [October 28, 2016, 9:52am UTC](https://forums.powershell.org/t/ports-protocols-and-services/7430/1 "2016-10-28T09:52:38Z")

</div>

I know how to grab services off of remote machines because most tutorials wear get-service out. I am having trouble finding anything in PowerShell v3 to help with the ports part of the equation. Are there any cmdlets that allow you to scan a computer’s ports?

---

<div class="post-metadata">

**Author:** ![matt-bloomfield](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@matt-bloomfield](https://forums.powershell.org/u/matt-bloomfield)\
**Post date:** [October 30, 2016, 6:41am UTC](https://forums.powershell.org/t/ports-protocols-and-services/7430/2 "2016-10-30T06:41:59Z")

</div>

Not aware of anything in version 3. Version 4 added Test-NetConnection which sort of adds that functionality but I suspect you’d have to work a bit of magic [like Boe Prox did with ping](https://learn-powershell.net/2016/04/22/speedy-ping-using-powershell/) to make it useful.

While non-native PowerShell solutions do exist, I’d be inclined to use nmap for the port scanning and parse its XML output with PowerShell.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:40pm UTC](https://forums.powershell.org/t/ports-protocols-and-services/7430/3 "2024-05-16T20:40:50Z")

</div>


