This is an example of retrieving WMIC results using the xp_cmdshell proc, and inserting the results into a table.
Specifically, this script retrieves disk info from the LogicalDisk class, but WMIC provides thousands of other properties. WMIC does require it be ran from a Windows 2003 server, but can query other Windows 2000 servers when executed from a W2003 server.
NOTE: If WMIC hasn't been run on the server before, it'll do a compile on its first run. I recommend doing a manual execution of WMIC first before using this script, so you don't insert an extraneous output into the temp table
This example lists the available alias' on the system (e.g. WMIC alias list brief)
WMIC Reference:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wmic_overview.mspx?mfr=true
Another script from DOS but shows alerts
Like the one posted before, the use of the SP is like this: proc_alerts 1,18. This will show the first 18 alerts on the system. OR proc_alerts 20,35 will show from 20 to 35. This lets you manage the list without letting go out of the screen.
2001-11-03
1,042 reads