Windows Server - Alerts for Performance Counters

Asked By Tom
14-Nov-07 01:32 PM
I have been searching every where to find some sample code (vbscript, VB.NET,
c#, VB) to create alerts in "Performance Logs and Alerts".  Does anyone have
any sample code to get me started?
VB.NET
(1)
VB
(1)
JosephIt
(1)
Windows
(1)
Sysmon
(1)
Corey
(1)
Vbscript
(1)
Registry
(1)
  Joseph T Corey replied...
14-Nov-07 02:59 PM
The WMI classes for Performance Monitor alerting is pretty slim. To my
knowledge, the Sysmon class (which is under root\WMI) is limited to one
method and does not include a means to create new alerts.

However, this can be done using the logman command. You could do something
like this if you wanted to alert when the available memory is below 50MB:

logman.exe create alert new_alert -th "\Memory\Available MBytes<50"

There is much more info at
http://technet2.microsoft.com/windowsserver2008/en/library/93e6fc2b-5bf5-413b-84b4-be8b9dd3a57d1033.mspx?mfr=true.

If you need to wrap in VBScript for some reason, just use the Run method of
Wscript.Shell.

Hope this helps!

--
Joseph T. Corey  MCSE, Security+
Systems Administrator
jcorey@cmu.edu
  Tom replied...
14-Nov-07 04:00 PM
Joseph
It looks like anything less then Windows 2008 does not have the ability to
add alerts...bummer but I'm glad to hear that they addressed that issue.  I
think I found a way to create one by creating some registry keys.  I'm still
testing it on my Virtual Machine.  I'll post it when I completely tested it.
Maybe I can create a program to versions less then Windows 2008.

Thanks so much for your help.
Create New Account
help
Windows Server sbs2008 dns issue Hi, I just installed SBS2008 and love it but I have outside access, are you using http: / / OR = https: / / ? - - = 20 Cris Hanna [SBS - MVP] Co-Contributor, Windows Small Business Server 2008 Unleashed http: / / www.amazon.com / Windows-Small-Business-Server-Unleashed / dp / 06723295 = 73 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D1217269967 DIV> Business = 20 Server 2008 Unleashed<BR> <A = 20 href = 3D"http: / / www.amazon.com / Windows-Small-Business-Server-Unleashed / dp / = 0672329573 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D1217269967 = &sr = 3D8-1"> http: / / www.amazon.com / Windows-Small-Business-Server-Unleas = hed / dp / 0672329573 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D121 outside access, are you using http: / / OR = https: / / ? - - = 20 Cris Hanna [SBS - MVP] Co-Contributor, Windows Small Business Server 2008 Unleashed = http: / / www.amazon.com / Windows-Small-Business-Server-Unleashed / dp / 06723295 = 73 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D1217269967 Small = 20 Business Server 2008 Unleashed<BR> <A = 20 = href = 3D"http: / / www.amazon.com / Windows-Small-Business-Server-Unleashed / dp / = 0672329573 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D1217269967 = &sr
Windows Server Cannot join my W2K8 server to my sBS 2003 R2 domain I'm trying to join a Windows 2008 server to a SBS 2003 R2 domain. The SBS 2003 R2 server is fully here Be sure to identify which is which. - - = 20 Cris Hanna [SBS - MVP] Co-Contributor, Windows Small Business Server 2008 Unleashed http: / / www.amazon.com / Windows-Small-Business-Server-Unleashed / dp / 06723295 = 73 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D1217269967 Microsoft Please do not submit questions directly to me. I'm trying to join a Windows 2008 server to a SBS 2003 R2 domain. The = SBS = 20 2003 R2 server is DIV> Business = 20 Server 2008 Unleashed<BR> <A = 20 href = 3D"http: / / www.amazon.com / Windows-Small-Business-Server-Unleashed / dp / = 0672329573 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D1217269967 = &sr = 3D8-1"> http: / / www.amazon.com / Windows-Small-Business-Server-Unleas = hed / dp / 0672329573 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D121 com"> Birdies@BogusEmail.com< / A> > = wrote in = 20 message <A = 20 = trying to join a Windows 2008 server to a SBS 2003 R2 domain. The SBS = R2 server is fully patched
Windows Server Event ID errors 40961 and 40960 (source = LSASRV) Hi All, I'm desparate and success: -Based on research installed WinXP SP3. -Checked eventvwr and still noticed domain errors; ran windows update again. -Tried to do a ipconfig / registerdns per recommendation of research. -Tried to leave chance this computer has McAfee installed on it? - - = 20 Cris Hanna [SBS - MVP] Co-Author, Windows Small Business Server 2008 Unleashed http: / / www.amazon.com / Windows-Small-Business-Server-Unleashed / dp / 06723295 = 73 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D1217269967 success: -Based on research installed WinXP SP3. -Checked eventvwr and still noticed domain errors; ran windows update = again. -Tried to do a ipconfig / registerdns per recommendation of research. -Tried to leave DIV> Business = 20 Server 2008 Unleashed<BR> <A = 20 href = 3D"http: / / www.amazon.com / Windows-Small-Business-Server-Unleashed / dp / = 0672329573 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D1217269967 = &sr = 3D8-1"> http: / / www.amazon.com / Windows-Small-Business-Server-Unleas = hed / dp / 0672329573 / ref = 3Dpd_bbs_sr_1?ie = 3DUTF8&s = 3Dbooks&qid = 3D121 on research installed WinXP = SP3.<BR> -Checked = 20 eventvwr and still noticed domain errors; ran windows update = again.<BR> -Tried = 20 to do a ipconfig / registerdns per recommendation of = research.<BR
Windows Server Windows Update no longer working 0x80004002 Windows automatic update is no longer working. Since June 10 I get 0x80004002 related errors. Then today I tried to update manually from the windows update site, which brings me in an endless loop. The message after selecting quick update and files are not on the computer, I am asked to correct this, I continue, Windows is downloading and registering the files (tells the webpage), after which I am redirected to force install WUA with WindowsUpdateAgent20-x86.exe / wuforce and after that tried to update from Windows Update website. Again, I am in the same loop: I select quick scan, get the help me out. = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 2007-06-13 18:39:34 4048 1690 Setup * Inf file: C: \ WINDOWS \ SoftwareDistribution \ WebSetup \ wusetup.inf 2007-06-13 18:39:34 4048 1690 Setup Update required for C: \ WINDOWS \ system32 \ cdm.dll: target version = 5.8.0.2694, required version = 5.8.0.2469
Windows Server retrieving current user info from LDAP using vb.net This is a multi-part message in MIME format. - -- -- - = _NextPart_000_0034_01C793BC.E723DB50 Content-Type: text / plain wrong. I don't care either way, I just need a = solution! Anyway, in my vb, net app I can easily retrieve the current user's name = with the following code: Dim LDAP browser, but I can't figure out how to create = the login in the vb.net app. As far as I can tell, the code should look = similar to: AppUser = 3D browser, but I can't figure out how to = create the = 20 login in the vb.net app. As far as I can tell, the code should = look = 20 similar to