Hello, We did that before...But... Have you ever tried to access a console window of a server that hasn't been rebooted for a while? You have to ok all those silly messages before you can start your work... Plus the fact that different sites get the same message i.e. people abroad get notifications that the "tea lady is outside the building" - not very nice for them I assure you!!! Its why we went down the route of selectively messaging people in the first place... Thanks anyway =) Regards Jaime -----Original Message----- From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Jon Spriggs Sent: 28 March 2006 14:34 To: thin@xxxxxxxxxxxxx Subject: [THIN] Re: message notifier How about netsending the whole domain? Regards, Jon On 3/28/06, IT Support <it@xxxxxxxxxxxx> wrote: > > > > Greetings list > > > > We currently employ a VBS script to notify users about mundane stuff like > Server Reboots and sandwich rounds (see below) but have noticed that this > can spike CPU and memory usage with the trillions of net sends that the > script sends out.... > > > > Has anyone else found a more efficient way to net send users? > > > > Please feel free to tear apart the script and pick holes =) > > > > -------------------------- Script Below ---------------------------- > > sGroupName = "All Internal Users" > > sDomain = "CORPORATE DOMAIN NAME" > > sMessage = "Server will be rebooted in 5 mins, please save your work and log > out" > > bForce = False > > On Error Resume Next > > Err.Clear > > Set oGroup = GetObject("WinNT://" & sDomain _ > > & "/" & sGroupName & ",group") > > If Err.Number <> 0 Then > > Err.Clear > > Wscript.Echo "Unable to find group " & sGroupName > > Wscript.Quit(1) > > End If > > On Error GoTo 0 > > Set oShell = CreateObject("Wscript.Shell") > > nCount = 0 > > nError = 0 > > For Each oMember In oGroup.Members > > nRC = oShell.Run("command /c net send "& oMember.Name & " " & sMessage, 0, > bForce) > > If nRC = 0 Then > > nCount = nCount + 1 > > Else > > nError = nError + 1 > > Wscript.Echo "Message NOT sent to " & oMember.Name _ > > & ", error code " & nRC > > End If > > Next > > ------------------------------------------------------------------------ -- > > > > Regards, > > Jaime > > ************************************************ For Archives, RSS, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link: //www.freelists.org/list/thin ************************************************ ************************************************ For Archives, RSS, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link: //www.freelists.org/list/thin ************************************************