Solved

Alter Script

Posted on 2013-01-17
6
225 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
Comment Utility
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
Comment Utility
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
Comment Utility
Aikimark,

Sorry, my bad.
0
 
LVL 1

Author Comment

by:MattyS82
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Recently I finished a vbscript that I thought I'd share.  It uses a text file with a list of server names to loop through and get various status reports, then writes them all into an Excel file.  Originally it was put together for our Altiris server…
Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now