Link to home
Start Free TrialLog in
Avatar of ullmanneric
ullmanneric

asked on

Windows Scripting

I am trying to make a couple of scripts that I can run on about 600 windows 2000 and 2003 servers. I want to scan teh services to see which servers have IIS and the print spooler running. I then want to exprot the data to an excel spreadsheet. I would also like to make a script that can tell me how much space is available on all drives. ANy suggestions.
Avatar of getzjd
getzjd
Flag of United States of America image

Though it is not a script, something like Spiceworks http://www.spiceworks.com/  can scan for  all that and then some.  We configured spiceworks to monitor and alerts us on server hard drive space remaining etc
And.... It's free!  Something all companies love to hear!
Avatar of ullmanneric
ullmanneric

ASKER

Yeah I just want to create a script

use following command

sc \\computername query spooler | find /I “STATE”

it will show you the result for one computer but if you wnat for multiple systems then use following

@Echo off

For /L %%C IN (1,1,600) DO (
echo 172.16.96.%%C
sc \\192.168.1.%%C query spooler | find /I “STATE” >>c:\1.txt
)
Exit /B 0

What above script do it run check spooler service for 1 to 600 computers and record it in 1.txt on your C: drive

you can change the ip scheme as per your network. For any other help feel free to contact me
opps the ip scheme with echo command should be the same like 192.168.1.%%C as it is shown in above script with sc command. i have mistakenly type two different ip schemes
Read this article:

http://www.experts-exchange.com/ITPro/Consulting/A_2111-WARNING-5-Reasons-why-you-should-NEVER-fix-a-computer-for-free.html

IT'S VERY IMPORTANT!

It also applies to "program me a script" or "help me see if my environment is up to speed" or "work for me for free"

I agree with getzjd!  AND IT'S FREE!  Something anyone likes to hear.

Also here some advice, this for free...

If you have 600 servers to administer:

1. Buy a few books on PowerShell and VBScript. Read them!!!
2. You are probably in a team of people, at least one of them should know how to program a VB Script

ASKER CERTIFIED SOLUTION
Avatar of raiERB
raiERB

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial