Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Alter Script

Posted on 2013-01-17
6
Medium Priority
?
241 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
[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
  • 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
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 course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

688 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