This is a basic test harness using Pester with a JSON configuration file to describe and test the accessibility of any number of TCP ports on any number of host machines.
Edit services.json
to describe the services you want to test by creating a named object record under Services
, with a DisplayName
string property, and a Ports
array property with one or more TCP ports expressed as an integer:
"Services": {
"WebServer": {
"DisplayName": "Web Server (HTTP/S)",
"Ports": [80,443]
},
"SSH": {
"DisplayName": "SSH Server",
"Ports": [22]
}
}
With your services defined, add one or more objects to the Hosts
array with a Host
string property describing the computer hostname, fully-qualified domain name, or IP address, and a Services
array of strings representing the services described in the JSON file:
"Hosts": [
{
"Host": "www.milestonesys.com",
"Services": [
"WebServer",
"SSH",
"RDP",
"DNS"
]
}
]