Solved

Alter Script

Posted on 2013-01-17
6
228 Views
Last Modified: 2013-03-19
Hey,

How do I edit the attached script to read from a text file of servers to query?

At the moment it's run on a instance of per server basis (a pop up box appears and the server name is entered). We have a plethora of servers that this needs to be run on.

All credit for this script goes to

 Patrick Ogenstad (email redacted by aikimark -- ZA)
0
Comment
Question by:MattyS82
  • 3
  • 2
6 Comments
 
LVL 1

Author Comment

by:MattyS82
ID: 38790468
Script that I would like some advice on how to edit.

Instead of reading per server, I would like it to read from a list of server names in  a text file.
sydi-server.vbs
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 38795352
Hi, I've added an argument of -i for the input file.  I'm not sure I've made that correct, but we'll see how it goes.  It should work as
-i:Computers.txt

with Computers.txt being in the same folder, but I haven't tested it.

Regards,

Rob.
sydi-server.vbs
0
 
LVL 1

Author Comment

by:MattyS82
ID: 38799153
Aikimark,

Sorry, my bad.
0
 
LVL 1

Author Comment

by:MattyS82
ID: 38799163
RobSampson

Thanks but that didn't work. Comes up with an error --The remote server machine does not exist.
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 38804096
Hi MattyS82,

I have added additional error checking to continue scanning other machines if one cannot be connected to.  This won't solve your connectivity problem with that particular machine however.  When you get "The remote server machine does not exist." this means that it is either offline, the firewall is blocking it, there are WMI issues, or access may be denied.

This is the command I ran it with:
cscript.exe sydi-server.vbs -ws -rk -i"servers.txt"

Regards,

Rob.
sydi-server.vbs
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

803 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