Killing a stuck Windows Service

Hi

I guess all of us met the phenomenon when a service refuses to stop and stuck on “Stopping” status.

well, there is a remedy to this by following this short procedure:

1. Identify the PID of the rogue service. open cmd and type: sc queryex

you will receive a long list of available services. you can also type sc queryex > c:\ServiceList.txt to send the output to a text file.

Continue reading Killing a stuck Windows Service

How to get a remote servers’ TCP/IP configuration: IP, DNS, GW via PowerShell

Hi

When you need to know the DNS configurations of a remote machine without logging in to that machine.  Using a script that can do the job on remote computers is the answer.

There are some very good Ebooks online that can teach you how to do this.

This nice Powershell script will do the work. The source I found on this web site and changed it for my needs.

Continue reading How to get a remote servers’ TCP/IP configuration: IP, DNS, GW via PowerShell

Display computer name under My computer icon

Hi

A very useful trick that I always use in my servers is displaying the computer name under ‘My Computer’ or ‘Computer’ in Windows 7/2008R2

To do this you need to change a certain registry key.

In xp/2003 operation systems the process is simple as described below.

In 2008/Win7 though, you will first have to logon as administrator and take ownership on the hive where the registry settings needs to be modified.

So how do we do this?

Continue reading Display computer name under My computer icon

Monitoring memory usage with powershell

Hi

Recently I discovered that some of my managed servers has a memory leak.

to find which of the 300+ servers are running out of memory,

I wrote a simple and useful Powershell script.

You can use this as a template and add more hardware or software sampling with the correct WMI classes.

Continue reading Monitoring memory usage with powershell

Pinging multiple devices with powershell using the Test-Connection cmdlet

If  you need to ping a list of computers or servers,

use this simple Powershell script that reads the list of host names from a .txt file (serverlist.txt file).

It uses the Test-Connection cmdlet to check for the remote computer status.

Continue reading Pinging multiple devices with powershell using the Test-Connection cmdlet

How to build a simple setup program you’ve developed yourself.

Hi SysAdmin

Ever wanted to build your own executable software? or protect your credentials included in a script?

There are some tools on the market like ‘wise installation system’ that can do the job.

But there is also a nice and free solution from Microsoft, embedded in your OS.

Continue reading How to build a simple setup program you’ve developed yourself.

How to creat Mini Macros with the doskey command

While you are in a command prompt session, you can create mini macros to execute long sentences of commands with just one word:

doskey mnd = net use Z: \\server1\myshare /user:admin MyPassword 

When you write mnd and hit enter, the complete net use command will be executed.

Continue reading How to creat Mini Macros with the doskey command