Check the status of your servers

From Wiki

Revision as of 20:48, 25 July 2008 by SYNACK (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to:navigation, search

Creator: Zak Fleming

Script Language: VBS

Forum topic Link: http://www.edugeek.net/forums/showthread.php?p=148444#post148444

This is a simple, but very effect script. When you run this script you can check the status of your Windows servers in seconds. Simply edit the server names used here to the names of your servers. Please not the areas where I haven’t used numbers or hyphens you will have to replace these with something more suitable.

<vb> Dim logon, fndconeN, fndctwo, fnexchange Dim filesys, objshell, servermessage,

Set filesys = CreateObject("Scripting.FileSystemObject") Set objshell = CreateObject("WScript.Shell")

fndconeN = "OFF" fndctwo = "OFF" fnexchange = "OFF"

If filesys.FileExists ("\\fn-dc-01N\c$\WINDOWS\win.ini") Then fndconeN = "ON" If filesys.FileExists ("\\FN-DC-02\c$\WINDOWS\win.ini") Then fndctwo = "ON" If filesys.FileExists ("\\FN-Exchange\c$\WINDOWS\win.ini") Then fnexchange = "ON"

servermessage = "FN-DC-01N = " & fndconeN & VBCR & "FN-DC-02 = " & fndctwo & VBCR &"FN-Exchange = " & fnexchange

retval = objShell.Popup(servermessage, ,"Server Status",0 + 64 )

wscript.quit </vb>