Solved

Alter Script

Posted on 2013-01-17
6
232 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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