Restart Windows Services from Linux

If you use Linux, and you need to restart a Windows service, you don’t need to logon to a Windows machine.

You just need to run the following commands:

If you don’t know the Service name, you can list the available services with:
net rpc service list -I IPADDRESS -U USERNAME%PASSWORD
Just a little head’s up. You will need the samba-common package installed in your Linux box.

Quickly open a program in administrator mode in Windows 7

We all need to use the “Run As Administrator” option in Windows 7, Vista or Server 2008, at some point.

The obvious way is to right click and select the “Run As Administrator” option, but, there’s another way.

Use the shortcut Ctrl + Shift + Click to open any software in administrator mode.


Verify replication with other domain controllers

When you need to test your domain replication, you can run a couple of tests from the command line.

To verify replication is functioning

  1. Open a Command Prompt.
  2. Type dcdiag /test:replication and press Enter.
  3. To verify that the proper permissions are set for replication, type dcdiag /test:netlogonsand then press Enter.Messages indicate if the connectivity and netlogons tests passed.

Cleanup Windows devices

Hello reader.


We all know that Windows stores a lot of information about devices we plug-in. That might lead to performance problems and even device connectivity issues.

But how do we get rid of that friend’s USB drive that we plugged-in once to copy some pictures.

How about a server recently virtualized, showing you network warnings when setting up the static IP address?

Reinstall the system? No.

Here’s how:


Open a command line (use Administrator mode in Vista/7/Server 2008) and type:

set devmgr_show_nonpresent_devices=1

and then type:


After that, just select the option “Show Hidden Devices” under the View menu.

And you can see all the devices no longer available in your computer.

You just have to select the device, one by one, and uninstall it.

Note: The command line should be open during the whole process.



Delete Failed DCs from Active Directory

S#!” Happens!!!
The hardware failed, some software installation killed you DC or you just formatted it without demoting it first.
This will leave the entries in you Active Directory database and will eventually give you some trouble.
So, to remove this information all you need is to open a command line and be a member of the Enterprise Admins universal group.
So, open a command line and type ntdsutil. This will give you a new prompt.
At the ntdsutil: prompt, type metadata cleanup and press Enter.
At the metadata cleanup: prompt, type connections and press Enter.
At the server connections: prompt, type connect to server <servername>, where <servername> is the domain controller (any functional domain controller in the domain) from which you plan to clean up the metadata of the failed domain controller. Press Enter.
Type quit and press Enter to return you to the metadata cleanup: prompt.
Type select operation target and press Enter.
Type list domains and press Enter. This lists all domains in the forest with a number associated with each.
Type select domain <number>, where <number> is the number corresponding to the domain in which the failed server was located. Press Enter.
Type list sites and press Enter.
Type select site <number>, where <number> refers to the number of the site in which the domain controller was a member. Press Enter.
Type list servers in site and press Enter. This will list all servers in that site with a corresponding number.
Type select server <number> and press Enter, where <number> refers to the domain controller to be removed.
Type quit and press Enter. The Metadata cleanup menu is displayed.
Type remove selected server and press Enter.

You will receive a warning message. Read it, and if you agree, press Yes.

At this point, Active Directory confirms that the domain controller was removed successfully. If you receive an error that the object could not be found, Active Directory might have already removed from the domain controller.

Type quit, and press Enter until you return to the command prompt.

After you just need to confirm if the object was completely removed from Active Directory.

To remove the failed server object from the sites

In Active Directory Sites and Services, expand the appropriate site.

If the object exists, delete the server object associated with the failed domain controller, then open Active Directory Users and Computers go to the Domain Controllers container and, again, if exists, delete the computer object associated with the failed domain controller

You might get a warning asking you if you want to delete the server object without performing a DCPROMO operation (which, of course, you cannot perform). Just select “This DC is permanently offline…” and click on the Delete button.AD will display another confirmation window. If you’re sure that you want to delete the failed object, click Yes.

All that’s missing now is the DNS entries. So open the DNS mmc console.

In the DNS snap-in, expand the zone that is related to the domain from where the server has been removed.
Remove the CNAME record in the _msdcs.root domain of forest zone in DNS. You should also delete the HOSTNAME and other DNS records.
If you have reverse lookup zones, also remove the server from these zones.
Just a couple of word of advice.
Using the ntdsutil utility incorrectly may result in partial or complete loss of Active Directory functionality.
If the Domain Controller was responsible for any FSMO, don’t forget to seize the roles first.

Reset the DSRM Administrator Password

Let’s say your new at some organization and you need to be sure of the Directory Services Restore Mode password.

Here’s how:

Open a command line and type ntdsutil.

At the Ntdsutil command prompt, type set dsrm password.

At the DSRM command prompt, type one of the following lines:

To reset the password on the server on which you are working, type reset password on server null. The null variable assumes that the DSRM password is being reset on the local computer. Type the new password when you are prompted. Note that no characters appear while you type the password.


To reset the password for another server, type reset password on server servername, where servername is the DNS name for the server on which you are resetting the DSRM password. Type the new password when you are prompted. Note that no characters appear while you type the password.

When your done, just quit by typing q at the DSRM command prompt, and then at the ntdsutil command prompt.

How to Identify missing Devices in Windows

Nowadays, Windows identifies the majority of devices, but there are always devices harder to identify. When that happens you don’t need to get your tools and start unscrewing.

Just open Device Manager and identify the unknown devices.

Then open the device, select the Details tab and look for Hardware Ids property.

There you can get the Device ID and the Vendor ID, which we can look for in PCIDatabase website (

The result should be something like this:

Now you can look for the device driver knowing what you’re looking for.


Data Protector – Remove clients from database

When you have a client in your Data Protector database that is no longer available, be it because you’ve reinstalled the OS without removing the agents, or because the machine simply died, you should clean up your client database.

For that, open the cell_info file with your preferred  text editor and just delete the client line.

The cell_info file is usually located in the OmniBackConfigServercell folder.