Windows – How to Kill hung service – Windows Service Which is Stuck

Sometimes as an administrator you may need to kill a service which is stuck in a ‘starting’ or ‘stopping’ state, in order to avoid having to reboot a server in the middle of the day.

These are the simple steps you need to do:

Find out the Service Name:

To do this, go in to services and double click on the service which has stuck.  Make a note of the “Service Name”.

Find out the PID of the service

To kill the service you have to know its PID or Process ID.

Open an elevated command prompt and type in:

sc queryex servicename

(where servicename is the name of the service you obtained from Step 1.)

Replace ‘servicename’ with the services registry name. For example: Print Spooler is spooler. (See Picture)

After running the query you will by presented with a list of details. You will want to locate the PID. (Highlighted)

Kill the PID

Now that you have the PID, you can run the following command to kill the hung process.

From the same command prompt type in:

taskkill /f /pid [PID]

Where [PID] is the service number.

This will force kill the hung service. (See Picture)

If it is successful you should receive the following message:

SUCCESS: The process with PID XXXX has been terminated.

Be careful of what you are killing though.  If you kill a critical windows service you may end up forcing the machine to reboot on it own.

Note: By forcing a service to stop you can also use these instructions to Kill a Windows Service which is stuck at starting as well.  This will allow you to restart the service.

Ref: SpiceWorks  Support4IT

How to Add or Remove Items from “New” Context Menu in Windows

In Windows, whenever we right-click on Desktop or in Windows Explorer, we get “New” menu which allows us to create new folder, new shortcut and new files using various known file types. It helps us in creating new files, folders and shortcuts easily and quickly.

Sometimes you may want to remove a few unwanted items from “New” menu to reduce its size or to restrict others from creating new files or shortcuts or you may want to add a few new items to “New” menu such as new file types, etc.

So today in this tutorial, we’ll tell you how to customize or modify the “New” menu in Windows to add or remove items from it. This method will work in all Windows versions:

METHOD A: To Add an Item in “New” Menu

1. Type regedit in RUN dialog box and press Enter. It’ll open Registry Editor. Now expand “HKEY_CLASSES_ROOT” key.

2. Now look for a sub-key having same name as the file type which you want to add in “New” menu. For example, if you want to add XML file type to “New” menu, look for .xml key under HKEY_CLASSES_ROOT key.

3. Now right-click on it and select “New -> Key” option. It’ll create a new key, give it nameShellNew

4. In right-side pane, right-click and select “New -> String Value“. Give it name NullFile and press Enter.


That’s it. You’ll immediately get the file type entry in “New” menu.

NOTE: Sometimes this method might not work for a few file types in newer Windows versions. In such condition, you’ll also need to create a dummy template file after following the above steps as mentioned in following steps:

5. Create a new file of same file type which you want to add in “New” menu (in our example we wanted to add XML file type to “New” menu, so we’ll create a new .xml file), give it any name and copy it to C:\Windows\ShellNew folder.


6. Now in Registry Editor, create another String with the name FileName in same key where you created NullFile string in Step 4 and set FileName string value to the full path of the file pasted in “C:\Windows\ShellNew” folder.


Since in our example, the full path of Template.xml file isC:\Windows\ShellNew\Template.xml, We have set the same as value of FileName string in Registry.

Now the new file type will appear in “New” menu as shown in following screenshot:



METHOD B: To Remove an Item from “New” Menu

1. Type regedit in RUN dialog box and press Enter. Now expand “HKEY_CLASSES_ROOT” key.

2. Now look for the file type which you want to remove from “New” menu, e.g. for removing “Rich Text Document (.rtf)” file type look for .rtf key under HKEY_CLASSES_ROOT key.

3. Expand it and delete the ShellNew key present under it.


4. That’s it. The file type will be removed from “New” menu.


Ref: AskVG

MCSE – Top 15 Interview Questions with Answers for Network Administrators

Top 15 Interview Questions with Answers for Network Administrators

Q1: What is Active Directory?

Active Directory provides a centralized control for network administration and security. Server computers configured with Active Directory are known as domain controllers. Active Directory stores all information and settings for a deployment in a central database, and allows administrators to assign policies and deploy and update software.

Q2: What is NetBIOS protocol?

NetBIOS (Network Basic Input/Output System) Protocol allows applications on separate computers to communicate over a LAN. It runs over TCP/IP giving each computer in the network a NetBIOS name and IP address. E.g. It can be used for computers running Windows 2000 (or before) to join a computer network running Windows 2000 (or later).

Q3: What are FSMO Roles?

FSMO roles are server roles in a Forest
There are five types of FSMO roles
1-Schema master
2-Domain naming master
3-Rid master
4-PDC Emullator
5-Infrastructure master

Q4: What is LMHOSTS file?

It’s a file stored on a host machine that is used to resolve NetBIOS to specific IP addresses.

Q5: What is ARP?

ARP is used to resolve a known IP address to a MAC address. For a host to communicate with another host, it must know the MAC address of the destination host (if they are on the same network) or next-hop router. This is the reason for ARP.

Q6: What is APIPA?

(Automatic Private IP Addressing) The Windows function that provides DHCP auto configuration addressing. APIPA assigns a class B IP address from to to the client when a DHCP server is either permanently or temporarily unavailable. Designed for small non-routable networks, if a DHCP server becomes available later, the APIPA address is replaced with one from the DHCP server. For example, when a Windows Vista machine starts up, it waits only six seconds to find a DHCP server before assigning an IP from the APIPA range. It then continues to look for a DHCP server. Previous versions of Windows looked for a DHCP server for up to three minutes. See DHCP auto configuration addressing, DHCP and private IP address.

Q7: What ports are used by DHCP and the DHCP clients?

Requests are on UDP port 68, Server replies on UDP 67

Q8: DNS zones – describe the differences between the 4 types.

i)Forward Lookup Zones :-

This zone is responsible to resolve host name to ip.

ii)Reverse Lookup Zones :-

This zone is responsible to resolve ip to host name.

iii)Stub Zone :-

Stubzone is read only copy of primary zone.but it contains
only 3 records the SOA for the primary zone, NS record and a Host (A) record.

Q9: DNS record types – describe the most important ones.

Type of Record What it does
A (Host) Classic resource record. Maps hostname to IP(ipv4)

PTR Maps IP to hostname (Reverse of A (Host)

AAAA Maps hostname to ip (ipv6)

Cname Canonical name, in plain English an alias.such as

Web Server,FTP Server, Chat Server

NS Identifies DNS name servers. Important for forwarders

MX Mail servers, particularly for other domains.MX records

Q10: What is Domain Controller?

A domain controller (DC) or network domain controller is a Windows-based computer system that is used for storing user account data in a central database. It is the center point of the Windows Active Directory service that authenticates users, stores user account information and enforces security policy for a Windows domain.
A domain controller allows system administrators to grant or deny users access to system resources, such as printers, documents, folders, network locations, etc., via a single username and password.

Q11: What is Group Policy?

Group Policy allows you to implement specific configurations for users and computers. Group Policy settings are contained in Group Policy objects (GPOs), which are linked to the following Active Directory service containers: sites, domains, or organizational units (OUs).

Q12: What are GPOs (Group Policy Objects)?

A Group Policy Object (GPO) is a collection of settings that control the working environment of user accounts and computer accounts. GPOs define registry-based policies, security options, software installation and maintenance options, script options, and folder redirection options.

Q13: Where is the AD database stored?

The AD database is stored in C:WindowsNTDSNTDS.DIT.

Q14: What is the SYSVOL folder?

The SYSVOL folder stores the server copy of the domain’s public files that must be shared for common access and replication throughout a domain.
All AD databases are stored in a SYSVOL folder and it’s only created in an NTFS partition. The Active Directory Database is stored in the %SYSTEM ROOT%NDTS folder.

Q15: What do Forests, Trees, and Domains mean?

Forests, trees, and domains are the logical divisions in an Active Directory network.
A domain is defined as a logical group of network objects (computers, users, devices) that share the same active directory database.
A tree is a collection of one or more domains and domain trees in a contiguous namespace linked in a transitive trust hierarchy.
At the top of the structure is the forest. A forest is a collection of trees that share a common global catalog, directory schema, logical structure, and directory configuration. The forest represents the security boundary within which users, computers, groups, and other objects are accessible.

Source : Corvit Training