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.
PowershellVB ScriptWindows Server 2003

Avatar of undefined
Last Comment
raiERB

8/22/2022 - Mon
getzjd

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
getzjd

And.... It's free!  Something all companies love to hear!
ASKER
ullmanneric

Yeah I just want to create a script

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Muhammad Farjad Arshad

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
Muhammad Farjad Arshad

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
raiERB

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

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
raiERB

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question