R
R
Rick2016-06-12 21:07:25
PowerShell
Rick, 2016-06-12 21:07:25

How to make a server availability check script?

Hello! There was a need to monitor servers remotely. Servers 4 pcs.
You want to "queue" to ping/nslookup and check the availability of the DNS server and return "OK" or "no access".
I didn't have much experience with powershell. What is the best way to organize the solution of this problem?
If anyone has a link to the manual, I'd be grateful.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
�
Евгений, 2016-06-12
@rick1211

all manuals on powershell commands are contained directly in powershell itself,
write get-help command and read. write get-help command -examples and see application examples.
To get started, I suggest you study the help on the following topics:
pipelines - general information and how to use
foreach - general information and how to apply
as well as commands:
get-content - getting a list of servers from a text file
Out-File - outputting the results of accessibility testing to a file
test-netconnection - direct accessibility testing.
The script, respectively, can be pushed into the task scheduler and run automatically at the desired interval.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question