PowerShell Tip of the Week: Check connectivity to multiple servers

You can find multiple articles on our blog about checking connectivity. This time I want to show you how to check it for bunch of servers on specific port. Check connectivity Script will use Test-NetConnection command where you can specify port number. For single machine you can use the following one-liner script: On the beginning you have to provide servers and destination servers againts which you want to check connection: …

PowerShell Tip of the Week: File browser

Today’s tip will be about file browser in PowerShell. Its a nice feature where you can just select the server list instead of writing path inside the code. File browser To select the file we’re gonna use System.Windows.Forms. The System.Windows.Forms namespace contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system. For more information please visit technet …

Use PowerShell to format port query (PortQry) output

Recently I had to check connectivity to several servers on some specific ports using PortQry. As some of you already know this command will return some kind of the connectivity test report. I wanted to convert this into nice formatted table. Port Query Port Query – Display the status of TCP and UDP ports, troubleshoot TCP/IP connectivity and security, return LDAP base query info, SMTP, POP3, IMAP4 status, enumerate SQL …

Use PowerShell function to check if servers are accessible

Recently I had to check quickly if all of managed servers are accessible. As SCOM monitoring wasn’t set yet in my environment I had to create simple script to do that. One of the easiest method to check if server is up is to test availability of network share. Test-Path There are many ways to check if server is accessible like for example using ping, checking some specific service but …

Test LDAP Connection with PowerShell

In this article you will find out how to test LDAP Connection to your domain controllers. It is very similar to previous post about Test-PortConnection function. In this example we will focus on making an LDAP connection using ADSI. On the beginning of function we need to check if DC name provided as a parameter is valid: Usage: Output: Final script: