Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB Script to verify computer is on-line

Posted on 2009-07-14
6
Medium Priority
?
413 Views
Last Modified: 2012-05-07
I need a VB Script to verify a group of computers in active directory are on-line each night.  When they are off-line 3 consecutive nights, then I need to be either given a report or notified.  The script could even save the report to a server share if need be.  The script does not have to query active directory.  If I need to, then I could supply a text file with all of the computer names.
0
Comment
Question by:bbanis2k
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 25

Expert Comment

by:SStory
ID: 24850261
You could PING the machine:

if Ping(strHost) = True then
    'responded
    'in here you could log it somehow
else
    'in here you could log it somehow
end if

However, firewalls and hibernation/, etc could cause problems with this.


0
 

Author Comment

by:bbanis2k
ID: 24850504
Does not seem like a good option.
0
 
LVL 25

Expert Comment

by:SStory
ID: 24858669
OK. What do you mean by online or offline? Reachable by the network?  If so pinging is a good test.
If you want to step up to VB.NET, you could do something similar to ping, or you could connect to a share via UNC paths and if you cannot consider the machine offline.  Firewalls and hibernation could still cause it to fail.  If it is a machine that should always be on, then hibernation and "sleeping" should be turned off and the firewalls adjusted to allow you to do whatever check you need to.

Are these machines in house and on the same network?

There is another more technical way of doing it. you could have a vb.net client program run on each of the machines that you want to watch and a special version running on the monitor.  Have the controller broadcast a message over the subnet broadcast (UDP), saying "Who's out there" and see who responds and keep a log. This would require a lot more code. There are examples on the internet.
Of course Windows does that all of the time to see who is out there.

As for an AD way to do it, I don't know how, but someone else may.
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 

Author Comment

by:bbanis2k
ID: 24860085
Same network...I just want to avoid ICMP traffic, due to firewall rules in Windows.

0
 
LVL 25

Accepted Solution

by:
SStory earned 2000 total points
ID: 24861196
yes, I understand

OK. you could try to do something with WMI:

Here is a link to someone doing it remotely.
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_23213918.html

0
 
LVL 25

Expert Comment

by:SStory
ID: 24861208
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question