Tag Archives: Windows 2012

Solving error “The trust relationship between this workstation and the primary domain failed.”

Last week I reverted an snapshot on an Virtual Server. When I restarted the VM, and try to logon, I received the following error:

“The trust relationship between this workstation and the primary domain failed.”

My domain admin account was unable to logon. My local admin account was able to logon. How to solve this issue without removing this VM from the domain.

Solution.

First, logon using the local administrator credentials.

Open an elevated Command Prompt and type the following command:

netdom resetpwd /s:[FQDN Domain Controller] /ud:[domain name]\administrator /pd:*

[FQDN Domain Controller] fill in the Domain Controller server name and domain.

[Domain name] fill in the domain name.

After running this command, restart the server and logon with the domain credentials. If everything went ok, you are able to logon on and the trust relationship is restored again.

For more information about the netdom command, see: https://technet.microsoft.com/en-us/library/cc772217(v=ws.11).aspx

Change product key in windows server 2012 or windows 8

Every time when I install Windows 2012 Server of Windows 8 I have to look up the command’s to active Windows. This is annoying, so I write up the solutions.

There are 3 methods.

1. Use slmgr

  • Open an elevated command prompt and type the following commands:
  • slmgr -upk
    This will remove the key first
  • slmgr -ipk xyzyx-xyzyx-xyzyx-xyzyx-xyzyx
    This will add your key. Of course replace the xyzyx-xyzyx with your own real key.
  • Activate Windows (you will probably have popups already during this process)

2. Use slui.exe

  • Swipe in from the right edge of the screen, and then tap Search. Or, if you are using a mouse, point to the lower-right corner of the screen, and then click Search.
  • In the search box, type Slui.exe 0x3.
  • Tap or click the Slui.exe 0x3 icon.
  • Type your product key in the Windows Activation window, and then click Activate.

3. You can also use the Volume Activation Management Tool (VAMT) 3.0 to change the product key remotely, or if you want to change the product key on multiple computers.

The last two methods I found referenced in this KB: http://support.microsoft.com/kb/2750773 (and the first one is to be found there as well in a way).

Adding and removing the GUI in Windows Server 2012

In Windows Server 2008 R2 you could select whether you wanted to run Standard (GUI) or Core version of Windows Server. In Windows Server 2012 the GUI is a feature which you can add or remove.

To remove the GUI you use the following Powershell one-liner:

Remove-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

You can also uninstall the GUI, which removes the binary files from the disk. To completely uninstall the GUI you use the following Powershell one-liner:

Uninstall-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

If you realize you are in over your head you can add it back in using:

Add-WindowsFeature Server-Gui-Shell

… or:

Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell –Restart –Source c:\mountdir\windows\winsxs

You can also do all of this using Dism:

Dism /online /enable-feature /featurename:ServerCore-FullServer /featurename:Server-Gui-Shell /featurename:Server-Gui-Mgmt