AutoSPInstaller: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.

During the weekend I started setting up a new dev environment on Windows Server 2012 R2. I used SQL Server 2012 and installed everything in the easy dev box setup mode (meaning all running under one account). I had the local farm is not accessible error message, even though all permissions were granted. After some reseach, I found out that by directly specifying the SQL server in the autospinstaller script, the Installation did continue.