I pulled apart a few stored procedures and ended up with this code. Very nice way to query the row count and size for each […]
Continue readingTag: Windows
SQL Server CPU Utilization
Some helpful SQL stats from this article. — From the SQL Server Performance Dashboard (sys.dm_os_ring_buffers) — Query CPU utilization for each four minute intervals declare […]
Continue readingUsing VBScript to List Processes in Windows
Just like ps, this VBScript will return the running processes. Just like using Task Manager. Very simple. strComputer = “.” Set objWMIService = GetObject(“winmgmts:” _ […]
Continue readingList Scheduled Tasks from a Windows Server
This script will query a server and output a list of scheduled tasks as a csv (Excel) file. This file is useful when auditing servers. […]
Continue readingDisplay Process List Using VBScript
This great VBScript script will display running processes on a Windows workstation. The script queries the Win32_Process from a WMI Object using ExecQuery then loops […]
Continue readingFinding Duplicate Rows in SQL
I used this to solve a problem today. // Finding duplicates in a table SELECT email, COUNT(email) AS NumOccurrences FROM users GROUP BY email HAVING […]
Continue readingEnable Remote Desktop Remotely
For Windows XP: 1. Go to Start, Run and type: regedit 2. In regedit, click File, Connect Network Registry 3. Enter the name or IP […]
Continue readingSend an Email with VBScript
Another really easy script. This script will send an email. As I automate tasks, I like to build an html log file and email the […]
Continue readingHow to Write to the Windows Application Log Using VBScript
This script helped me configure an enterprise monitoring system. I created little events in the Windows event log and monitored the events using the syslog […]
Continue readingRetrieve Model and Serial Number with VBScript
Simple script to retrieve information about a workstation or hardware. strComputer = “.” Set objWMIService = GetObject(“winmgmts:” _ & “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”) Set […]
Continue reading