Posts Tagged ‘vbs’

Script to autmaticly send Alt-Tab

July 13th, 2011 2 comments

VBS Script to autmaticly send Alt-Tab and switch opened programs

Option Explicit
Dim objShell
Set objShell = CreateObject("WScript.Shell")
      objShell.SendKeys "%+{TAB}"
      Wscript.Sleep 300000
Categories: HowTo, Windows Tags: , , , ,

Nagios check_con

August 11th, 2010 1 comment

I wrote a simple plugin to check the number of established connections
to a windows server. Just execute:
cmd /c netstat -an |find /i “estab” /c
I also wrote a script for Windows
Here is the code

Read more…

replicate IIS configuration

May 26th, 2010 No comments

Well if you have the mission to keep multiple webservers IIS 6.0 with exactly same setup its not an easy job!
I was faced with this challenge and ended up writing yet another vbs script.
I played with Microsoft tool web deploy

Read more…

Monitor IIS erros with nagios

May 21st, 2010 4 comments

So How can we know the IIS server is responding to all petitions?
Well I found a way to go directly in the IIS log files and get the results from there. They key was logparser
Its very usefull to monitor, if the site is acting wierd or is being attacked by hackers the thresholds should go off.

Read more…

NC_NET execute a vbs script

March 22nd, 2010 No comments

How to configure NC_NET execute a vbs script

I was used to the simplicity of NRPE_NT, where
things are much easier and straight forward.
I am now tring NC_NET wich for startes requires Framework 2.0 and a server reboot to be installed.
Also the configuration file is HUGE, there are way more possiblities including passive checks witch I dont use.
Its for sure a more powerfull tool but wish it was easier to use.
For example I spen 2hrs to find out how to execute a vbs script I created.
Here is how to do it:
1.Copy script to C:PROGRA~1MontitechNC_Netscript also copy cscript (otherwise wont work!)
2. Edit lines on NC_NET config file startup.cfg
do_not_blaim_nc_net    true
allow_run_scripts    true
For troubleshooting:
testrun    true
3. Restart the service
4. You can verify on eventviewr if ur changes where OK.
5. Call the vbs from nagios
The hard part was to find out how to call the vbs!
for help
./check_nt –help=RUNSCRIPT
To Run
./check_nt -H <HOST> -v RUNSCRIPT  -l “cscript.exe //nologo C:PROGRA~1MontitechNC_NetscriptSCRIPT.vbs -p E:Logs -e”

Categories: Nagios, plugins Tags: , , , , ,

Enumerate exchange mailboxes script

October 17th, 2009 1 comment

I had already written a simillar script, that would go thru an entire Cluster and SGs, these one implements same theory but it is more flexible and easy to use.
Basically you will get 3 types of info and all easily imported to excel, so you can show your boss a nice report.

Read more…

Enumerate all IIS websites script

October 15th, 2009 No comments

These script can be usefull when we want to know or map where are all our websites located. It is also capable of querying remote servers like
getAllWebSistesIIS.vbs WEB2
I did like
getAllWebSistesIIS.vbs WEB2 >> web2sites.txt and then I imported to an excel. It makes life easier to know all websites our servers have.
My ideas to improve the script are:
get port bind, get home directory location, better print UP/DOWN, nagios plugins to monitor websites

Read more…

NRPE_NT Plugins

July 14th, 2009 No comments

There are quite a few nice nagios nrpe_nt plugins (vbs scripts) released by GroundWork, since 2006 they have
been working and improving these set of plugins.
Those scripts are very well written and they can be enhanced for your own platform.
I list here the functionality:

Read more…

Exchange mailbox login plugin

July 13th, 2009 No comments

This plugins uses a script called check_counter_rawcount.vbs developed by Dr. Dave Blunt at GroundWork Open Source Inc.
I used it to grab WMI performance counter information but the script itself allows many more “performance counters” to be used.
The script is included in NRPE_NT Plugins V2, it can also be download here.
The way I defiened in nrpe.cfg is:

Read more…

Get Local Admins

May 18th, 2009 No comments

Remotely Get Local Admins Users inside Administrators group, for Workstations
Also tests the connectivity, it gets computers from AD object type “computer”
and it prints out a nice report.

Read more…

Categories: VbScripts Tags: , , , , , , , , ,