“Snap-in failed to initialize” error message when you open Microsoft Management Console

When running Microsoft Management Console if you get the error where it fails to initialize, one possible fix could be as from the following link http://support.microsoft.com/default.aspx?Product=winxp&scid=kb;en-us;826282 Fix is To resolve this behavior, add the %SystemRoot%\System32\WBEM folder to your PATH environment variable. To do so, follow these steps: 1. Right-click My Computer, and then click Properties. 2. On the Advanced tab, click Environment Variables. 3. Under … Continue reading “Snap-in failed to initialize” error message when you open Microsoft Management Console

How to monitor CPU of oracle processes on Windows?

Using QSlice one can monitor CPU usage for individual thread on a windows box. Qslice can be downloaded from the following url http://www.microsoft.com/downloads/en/details.aspx?familyid=6247BB76-13C5-4E0E-B800-53DC1B84A94C&displaylang=en By clicking on the oracle.exe in Qslice it displays all threads and CPU usage for each thread, so using the following SQL you can match the corresponding SID. SQL> select to_char(p.spid, 'xxxxxxxx') threadid, s.sid, s.username, s.program from v$process p, v$session s where … Continue reading How to monitor CPU of oracle processes on Windows?

Script to change date on a computer

' ' script to change computer date ' DIM objShell strComputer = "." ' current host ' get current time Set objWMIService = GetObject("winmgmts:{(Systemtime)}\\" & strComputer & "\root\cimv2") Set colOS = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem WHERE Primary=True") For Each objOS In colOS Exit For Next Wscript.Echo "Current Date: " & strDate strNow = objOS.LocalDateTime ' loop through to get last 5 date FOR counter=1 TO … Continue reading Script to change date on a computer


Powershell – Powershell is in an interactive shell which supports scripting. You can download this from http://support.microsoft.com/kb/926139 Displays all the command available in Powershell PS>Get-Command CommandType Name Definition ———– —- ———- Cmdlet Add-Content Add-Content [-Path] [-Value] <Object[… Cmdlet Add-History Add-History [[-InputObject] ] [-Pass… … Get-Help [Name] – Help on command with description and parameter it takes PS>Get-Help Get-Process NAME Get-Process SYNOPSIS Gets the processes that … Continue reading Powershell

Process Information

Process Information – Powershell has feature allows one to list process information, list process by name. Also one can terminate process using “Stop-Process” PS>Get-Process -Name <program name> Example: PS>Get-Process -Name gvim Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName ——- —— —– —– —– —— — ———– 95 7 3208 9496 65 0.16 172 gvim 108 7 3696 4900 65 0.95 1456 gvim PS>Get-Process -Verbose … Continue reading Process Information