Discovery troubleshooting: Port Scan Natively Using PowershellIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } When troubleshooting Discovery issues, it is often necessary to carry out a port scan of a device to see if the ports are open and responding. This is normally done from the MID server host server to the device that is not being discovered. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Any Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } There are applications such as nmap and zenmap that can be used to obtain this information, but it is also possible to do this from a very simple one-liner in Powershell and avoid installing 3rd party software. Login to a MID server host and open a Powershell window. Then, use the following as a basis for your commands. Replace "x.x.x.x" with the IP address of the device to port scan. Example 1 - Single Port:Here we are checking if port 135 is open. If the port is not open, you are returned to the command prompt.C:\> 135 | % {echo ((new-object Net.Sockets.TcpClient).Connect("x.x.x.x",$_)) "$_ is open"} 2> $null135 is openExample 2 - Multiple Ports:Here we are checking if ports 22,80,135, and 443 are open. In this example port 22 is not displayed as it is not open on the device. C:\> (22,80,135,443) | % {echo ((new-object Net.Sockets.TcpClient).Connect("x.x.x.x",$_)) "$_ is open"} 2> $null80 is open135 is open443 is open If you want to check all of the valid Discovery Ports (as defined in the product documentation article: Discovery Ports and Protocols) then use the following command: C:\> (22,53,80,135,137,161,427,443,515,548,5060,5480,5989,9100) | % {echo ((new-object Net.Sockets.TcpClient).Connect("x.x.x.x",$_)) "$_ is open"} 2> $null Example 3 - Range of Ports:Here we are checking if all ports between 1 and 1024 are open. If no ports in the range are open, you are returned to the command prompt.C:\> 1..1024 | % {echo ((new-object Net.Sockets.TcpClient).Connect("x.x.x.x",$_)) "$_ is open"} 2> $null80 is open135 is open