just written a little vbs to parse the dhcp logfile for renews after 8pm (i run a short lease)
It works very well but am i going about it in the wrong way...
how do you do it?
Printable View
just written a little vbs to parse the dhcp logfile for renews after 8pm (i run a short lease)
It works very well but am i going about it in the wrong way...
how do you do it?
We use Nightwatchman http://www.1e.com/softwareproducts/n...man/index.aspx
which works well if you are running a standard Windows AD network.
Anybody know of any free alternatives? We all know how tight our budgets are!!
I thought i would parse the DHCP logfile because that seemed like a good way of not having to tie into AD (we have 3 domains) and people bring in their own laptops etc.Quote:
Originally Posted by ictstbenedicts
Also did'nt go down the route of ping sweeps incase the device (because it may not even be a computer) may not reply to echo requests.
Deja vu... search the forum for remote shutdown/psshutdown.. :)
The Netsh command can be scheduled to export the DHCP list.
my aim was not to shutdown the pc's but to identify the serial offenders and stick my foot up their arse ;)Quote:
Originally Posted by webman
I could have just batched a psshutdown for the portion of my subnet outside the fixed ip range but being a control freak i like the idea of knowing whats going on.
the script parses it at source, no exportingQuote:
Originally Posted by webman
Oh right, sorry... I misunderstood your original post. I can't think of another way to do this as we have ours shut down and automatically woken up - we urge people not to turn them off as we may need to do maintenance between after-school and shutdown time.
:hiding: Thanks !!
gr8 input, did'nt mean to sound negative if it came across as such.
No no.. not at all :) It's been a heavy day :cry: ;)
I have used the Sysinternals psshutdown program (free) and a series of batch files (never got around to sorting scripts) and a scheduler program.
We do have a couple of machines that need to be on or staff who work late so I can't have a blanket shutdown.
I don't know if this is what you're looking for, but I have a script, that you set to run at a given time. This checks which computers are still switched on.
It then emails me the details of any that have infringed my script.
Is there any chance you could post this script stewart as it sounds like quite a handy script to have.
Thanks.
lanview anybody?
we use this to shutdown any pc that is left switched on.
we also use this to monitor pc usage in terms of what pupils are doing whilst logged on.
Another benefit is remote support! we can assist staff where ever they are on site. I have just helped a member of the office staff troubleshoot and application error message. Our new office is thehighest point in the school so you can imagine the time we save visiting staff situated across the other side of the school!
we use lanview too, i have set all computers to shutdown but this will only shutdown the ones that are not logged on, then later on in the night i have a forced shutdown set which will shutdown even a logged on machine.
we told the staff that if they dont shutdown they could loose there work.
The machines are woke every morning before i come in, plus they have a uptime so i can see how long each machines has been on.
I once found a machine had been on for 21 days.
ive got a couple of scripts that runs as scheduled tasks that uses down from LS Tools Freeware
at 4pm
run and shutsdown any machine not logged on. comp.log is a list of computername prefixes we useCode:del loggedin.txt
for /f %%a in ('type comp.log') do (
for /f %%b in ('net view ^| find "\\%%a" /I ') do (
if exist %%b\c$ (
pslist %%b | find "explorer" /I && echo %%b >> loggedin.txt
if errorlevel 1 down %%b /P /Q)))
at 6pm
runs and forces any machines that were previously logged on off and emails me the listCode:for /f %%a in ('type loggedin.txt') do (
down %%a /P /F /Q )
blat loggedin.txt -to andy@domain -server exchange -f academic\administrator -q -s "forced these computers to shutdown at 6pm"