|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, June 22, 2011 8:36 AM
Points: 28,
Visits: 6
|
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Wednesday, February 15, 2012 9:18 AM
Points: 415,
Visits: 4
|
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 4:39 PM
Points: 6,260,
Visits: 1,977
|
|
One more thing: Isn't it possible to filter also on the DATE in the query? btw: Very nice script!
* Noel
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, March 24, 2006 11:52 AM
Points: 112,
Visits: 1
|
|
| Sorry, but I cannot find Win32_NTLogEvent anywhere. What is it - an mssql table, a file?
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 5:53 AM
Points: 2,692,
Visits: 1,074
|
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, June 22, 2011 8:36 AM
Points: 28,
Visits: 6
|
|
If you go to command prompt and type in wbemtest and enter. Hit connect. Change the location from: root\default to root\cimv2 and hit login Hit enumerate classes, use recursive radio button, hit ok You will no have a list of all the classes and their properties. You can scroll down to Win_NTLogEvent to see the properties in the middle window. Or you can cut and paste this script as ClassInfo.vbs Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 On Error Resume Next arrComputers = Array(".") For Each strComputer In arrComputers WScript.Echo WScript.Echo "==========================================" WScript.Echo "Computer: " & strComputer WScript.Echo "==========================================" strClass = "Win32_NTEventLog" Get objWMIService = _ GetObject("winmgmts:{impersonationLevel=impersonate}root\cimv2") Set colClasses = objWMIService.ExecQuery("SELECT * FROM " & strClass, "WQL", _ wbemFlagReturnImmediately + wbemFlagForwardOnly) i = 0 For Each objClass In colClasses i = i + 1 If i = 1 Then WScript.Echo "* Properties *" For Each objProperty In objClass.Properties_ WScript.Echo objProperty.Name Next WScript.Echo vbNewLine & "* Methods *" For Each objMethod In objClass.Methods_ WScript.Echo objMethod.Name Next End If Next Next Hope this helps
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, June 22, 2011 8:36 AM
Points: 28,
Visits: 6
|
|
Sorry the line strClass = "Win32_NTEventLog" Should read: strClass = "Win32_NTLogEvent"
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, November 30, 2010 8:34 AM
Points: 121,
Visits: 100
|
|
There are several lines in Alert.vbs that reference Microsoft's site. If my SQL server does not have HTTP access do the web what are my options here? Thanks.
objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'name of notesserverhost ? objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _ "mailserver" objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, June 22, 2011 8:36 AM
Points: 28,
Visits: 6
|
|
No http - no go. You could redirect the output to open an instance of word, excel, etc., then use this accross the lan but there are some issues with this especially with XP, SP2. I will consider this for a future article.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Friday, September 19, 2008 9:50 AM
Points: 15,
Visits: 7
|
|
I get this error when I try and run the script. Any thoughts. [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error
|
|
|
|