Real Time Service Monitoring with vbscript

Service monitoring sometimes become inevitable for any server admin. Here is a script to keep watching a windows service for any change in status. The script will alert you as soon as a service shuts down or starts up with no latency using minimal resources. The sample script here is to monitor sql server related services. You could alter the text pattern as marked to monitor your own service. Save the script to a vbs file and name it like For eg.”ServiceMonitoring.vbs” and double click the file to execute. The script keeps running in the background scanning the service status and sends out HTML email alert if it finds any change in the specified service status.

Failover Cluster Manager (cluadmin.msc) GUI crashes in Windows Server 2012

One fine day, I was given a project to deploy a failover cluster on Windows server 2012. I did all the usual steps. Enabled failover clustering feature, Validated and created the Windows cluster. But unfortunately, when I click on the cluster name or any group or resource in the Failover Cluster Manager GUI, below popup shoots out and the cluadmin.msc stops responding.FailoverCluster GUI Error Continue reading “Failover Cluster Manager (cluadmin.msc) GUI crashes in Windows Server 2012”

Install .net Framework 3.5 on Windows Server 2012

Normally until Windows Server 2008, we use to have the .net Framework available to enabled from Server features section in Server manager. We just have to enable the feature to install .net FW 3.5.

Here we ran into a situation where we had to install SQL Server 2014 on a Windows 2012 Server. .net Framework 3.5 was required for SQL 2014 and Windows 2012 didn’t have that by default. Also, unlike SQL Server 2008 or 2012, 2014 setup doesn’t install it by itself. It just say’s that it needs to be installed manually. We tried to enable the feature via Server manager, but it fails saying the source files doesn’t exist.

Below is how we finally managed to install .net 3.5.

  1. There is a folder named sxs in Windows Server 2012 / 2012R2 Install Disk. We extracted the sxs folder from a disk image and copied them over to C:\Softwares\Source\sxs folder on the target 2012 windows server.
  2. Open a powershell prompt and execute below command. It would take few minutes to complete and you now have .net Framework 3.5 on your Windows Server 2012.

Windows remote session monitor and control

This tip would help you retrieve the list of users currently logged on to a remote windows server and disconnect any user if required.

To see the list of user sessions on a remote windows server, use either of the below queries.

“query session /SERVER:<servername or IP Address>”

or

“qwinsta /SERVER:<servername or IP Address>”

To terminate a session, note down the session ID from the output obtained from above commands. Execute below commands to terminate a session.

  1. “net user /user:<Administrator login> \\<servername or IP Address>\C$” . Enter password when prompted.
  2. Execute “reset session <ID> /SERVER:<servername or IP Address>” or use the command “rwinsta <ID> /SERVER:<servername or IP Address>”

Quickly attach files in Outlook

1. Opportunity

Attaching a file to an email message can be a fiddly process, but you can streamline it and make sure you don’t forget the attachment by using Outlook’s filing system

2. How does the idea work?

This idea will help to attach and send the files very easily  

3. Method of Implementation

To attach the files you have to browse to the file you want to attach to a message and open Outlook at your inbox.Click and drag the file from its folder onto the inbox shown in your mail folders in Outlook. This creates a new message and attaches the file in one action. Now simply address it and add a covering note

Problem Steps Recorder (PSR)

1. Opportunity

I believe that every one of us takes screenshots with steps to work on something/ maybe explain the issues in a process. We have to use mspaint or snipping tool to mark and explain each steps with each screenshot. There is an automated process to do this in windows 7 and 2008 which is called the PSR. I hope we can use this for making the stuff very easy

2. How does the idea work?

This idea will help to save lot of time for documentation, For Example. We are conducting lot of internal trainings and Knowledge Transfer from Onshore team so it required step by step Documentation for future reference in this case taking each every screenshots used by other tools (MS Paint, Snipping Tool) will take hours or days to complete it but Once we started using the PSR we have been able to complete  in minutes and It’s quick, easy and effective to save you hours of troubleshooting time like if your customer required step by step details of solution steps.

 3. Method of Implementation

To do this,In Windows 7 , Windows 2008 and Vista you have to click Start, type PSR and press Enter, then click Start Record. If they then work through whatever they’re doing then the Problem Steps Recorder will record every click and keypress, take screen grabs, and package everything up into a single zipped MHTML file when they’re finished, ready for emailing to you. It’s quick, easy and effective, and will save you hours of troubleshooting time.

Tip: Adding Shared Disk to build a Failover Cluster inside VMware

If you wanna add a shared disk to the two nodes of a cluster to be built inside a VMware, Follow below steps.

  1. If your VMware is pretty Old, Then shutdown both the virtual machines to be configured as cluster.
  2. Then from inside VMware virtual center, right click one of the virtual machine and select ‘edit settings’.
  3. Create one SCSI control with sharing allowed among multiple virtual machines.
  4. Now click on Add and select Hard Disk.
  5. Select to create new virtual disk, provide required size, thin provisioning unchecked and to store with the virtual machine. And in advanced section, select the value for Virtual node (1:x, where 1:0 was selected as virtual node in step 3 and the x can have any value which is unoccupied. Since this SCSI control was newly created, all the nodes will be vacant. So here x can have any value between 0 and 15). Complete the wizard and now you have disk created and mapped to one virtual machine.
  6. Right click the same virtual machine once again and choose ‘edit settings’. And then click on the Hard Disk we just added. Now in a box at the right top corner, you will get the disk file location and name.
  7. Next use the tool putty (Let me know if you would like to know what putty is) and connect with the ESX host where the two virtual machines are located and also the disk we created in step 5 will be located.
  8. Using basic linux commands, navigate and find the Disk file and run below command to make the Disk file Zeroed (All bits on that disk are reset in this process).
    • vmkfstools -w /filepath/filename.vmdk

    , Continue reading…