Hello all,
I think this should be a simple question, but it's been killing me for most of
today.
I have an SNMP check (1.3.6.1.2.1.1.5.0) that returns the ComputerName
I'm then trying to send this is a simple vbscript that checks a win32 box to
see who the currently logged on users are.
I can make the script work as a standalone function, so I'm pretty sure I have
something wrong in the syntax inside SA.
Here's the functioning standalone sample:
***
msgbox Whoison(MyComputerName)
Function WhoIsOn(x)
who = "winmgmts:{impersonationLevel=impersonate}!//"& x &""
Set Users = GetObject( who ).InstancesOf ("Win32_ComputerSystem")
For each User in Users
list = list & ", " & User.Username
Next
WhoIsOn=list
End Function
****
I have the Script configured in Custom Scripts with the correct path and the
WhoIsOn as the function name.
All I'm getting back in %e is the name of the computer.
Also - Is there a Delay involved when a custom script is updated? Sometimes it
seems like I don't see a chamge made to a script come through right away.
Thanks
Doug Genne
Manager, IT
Palm Restaurant Group
To unsubscribe send a message with UNSUBSCRIBE as subject to [email protected]
If you use auto-responders (like out-of-the-office messages), then make sure
that they are not send to the list nor to the individual members of the list
that send a message. Doing this will get you removed from the list.