2014. május 28., szerda

AX 2012 R2 crashes while synchronizing with TFS - KB 2902776 to the rescue!

I had a very frustrating error on the development servers I oversee (each developer has their own virtual machine): when a new environment was created it simply wouldn't sync to the Team Foundation Server code repository.

If you clicked on Synchronize and selected the model, it would think for a bit, then 90% of the time, it would crash. Opening the sync log and trying to Process the failed elements would lead to the same AppCrash error.

Deleting the AX local caches didn't help, restarting the AOS, doing full compile, full CIL compile, nothing would help. Recreating the database would sometimes have an effect, but that's it.

Thankfully there is a solution:

KB2902776 solves the issue. Unfortunately it is only available from PartnerSource (which is not indexed by Google), so it took a bit to find it.

It is a model update of the Foundation model, so I assume there is a code error in the SysXXXX class that does the synchronization.

After installing the hotfix I did a full compile/sync/CIL compile cycle before trying it, no clue if that's actually necessary, but as there was a model update, you are supposed to waste two-three hours with it.

Hope it saves others some frustration!

2014. május 9., péntek

Adding a computer to a domain with Powershell

If you have to add lots of computers to a domain, (after launching sysprepped images for example, that already have their new computername), then the following script might come in handy, and save you some password typing.

This is a shortcut, of course, and a slight security trade off.
If you are not comfortable copy-pasting your password into powershell windows as cleartext, don't use the script!

2014. május 8., csütörtök

Turning off UAC in Windows 2012 R2 with Powershell

In Windows 2012 R2, the slider that we used to use for turning off UAC (User Account Control) does not really work. It is there, but when you adjust it to minimum, nothing happens, it doesn't even ask for a reboot.


Apparently, you have to manipulate the registry to turn the damn thing off.

The following powershell command, if executed from an Admin powershell window will do just that (and immediately notify you, that you need a reboot)

set-itemproperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system -name "EnableLua" -value 0