Check Services, Ping, Specific port for a group of servers, configurable by CSV and scalable and all with powershell

26 06 2013
Hi, there are some checks that are needed on a regular basis and doing them often requires me a tedious routine of remoting to each server just to view that a service is running, so I whipped up the following script to check the basic availability of a group of Servers, Where for each server the script can check services, telnet to specific ports and can be expanded to test additional items (by role for example),
I applied it to a XenApp environment and so I have the edgesight, Data Controllers, XML brokers, PVS provisioning servers, SQL, Web Interface, Appsense, NLB Virtual IPs etc., i didn’t need to test the actual XenApp worker servers, but i could just add lines to the CSV and have them tested.
And you could easily adjust it to a farm of web application servers just by editing the CSV file.
The script is configurable with a CSV file that holds parameters for the process.
Functions from: Jason Poyner
From his excellent script to check entire XenApp 6.5 architecture the moment, the script will work from Powershell interactive command line, in the next version i plan to add support
for numerous ports (same as with numerous services which is already available), prompt for path to CSV,
Feel Free to improve on this script just email me with the improvement and provide credit to jason for his excellent script.The parameters are (while not all in use):
FARM: if you want multiple zones / farm and need to check other things based on the farm / zone.
Name: or FQDN of the computer/server to check
IP: Limited to 1 IP
Role: DC/XML/WI etc.
Telnet: Yes/No, whether telnet check is required
Telnet_Port: port number to check
Services: Yes/No, whether services check is required
Service_Names: each service name should be separated with ‘;’ without spaces
Description: String as is to appear in results pane later


Script Check



<FARMNAME>,<VIPDNSNLB_WI>,<IP>,WI_VIP,Yes,80,No,,F5 Virtual IP for Web Interface
<FARMNAME>,<VIPDNSNLB_XML>,<IP>,XML_VIP,Yes,8080,No,,F5 Virtual IP for XML Broker
<FARMNAME>,<SQL>,<IP>,SQL,No,1433,No,,SQL Database Server for Citrix Farm
<FARMNAME>,<DataCollectorname>,<IP>,DC,Yes,8080,Yes,IMASERVICE;CTXHTTP,Citrix Data Collector
<FARMNAME>,<XMLBrokername>,<IP>,XML,Yes,8080,Yes,CTXHTTP,XML Broker
<FARMNAME>,<XMLBrokername>,<IP>,XML,Yes,8080,Yes,CTXHTTP,XML Broker


Newer version has been made, read all about it here




3 responses

20 11 2013

Hi Mate,

I would appreciate if you could share a power-shell script through which I can simply multiple perform telnet from an internal server and generate a report or a log file which informs me which telnet commands were successful and which failed.

For example:

telnet 443
telnet 22
telnet 21

and then a report
443 passed
22 failed.


20 11 2013
LeITchronicle Admin

Hey Colin,
The part of the script that does the telnet is the function called “check-port”,
It tries to open a socket to a specific host at specific ports,
So you could try and copy it as and try yourself,
Also make sure you subscribe to get updates if I will the telnet standalone script.

20 11 2013

I’m already subscribed to the email alerts as you have some good stuff on your site.

I will try this and will update you.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: