New Boundary Support Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Script to do on demand pollingExpand / Collapse
Author
Message
Posted 6/2/2006 6:06:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2/22/2008 3:52:19 AM
Posts: 3, Visits: 30
Hi again

here is another handy script if you have long polling time set on the channel and quickly want computers to poll the channel.

//Janne

'Author Janne Carlsson
'Simple script to make a range of computers poll their channel
'You need admin status on the remote computers.
'In prism console do a computer status report and sort on example attended and export to excel
'use the function Auto filter on for example the colum client status to get the machine attended copy the list of computernames to an txt file
'save it as computers.ini in folder "C:\Script\Prism"
'
'Cmdfile the file that executes on remote computer
'inifile the file that contains computernames to do the poll
'psexecfile the location of psexec
'
'The script uses psexec from pstools by http://www.systeminternals.com/
'Script start
'Path to files used by the script
psexecfile = "C:\Script\Prism\psexec.exe"
cmdfile = """C:\Program Files\Script\pollchannel.cmd"""
inifile = "C:\Script\Prism\computers.ini"
'
'random function so that not overload the server
intMax = 1 'seconds
intMin = 5 'seconds
Randomize
intWait = Int((intMax - intMin + 1) * Rnd + intMin)
'
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objFS=CreateObject ("Scripting.FileSystemObject")
set listFile = objFS.OpenTextFile (inifile)

do while listFile.AtEndOfStream <> True
 computer1 = (listFile.ReadLine)
 run = WshShell.run ( psexecfile & " " &  "\\" & computer1 &  " -i -n 5 " & cmdfile)
 'WScript.Echo( psexecfile & " " &  "\\" & computer1 &  " -i -n 5 " & cmdfile)
'Wait abit
 WScript.Sleep intWait * 1000
Loop

wscript.echo "Finished"

Post #1310
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: New Boundary Support

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 2:53am

Powered By InstantForum.NET v4.1.3 © 2008
Execution: 0.141. 12 queries. Compression Enabled.