I am trying to install SharePoint 2013 on a Windows Server 2012 machine using AutoSPInstaller available on CodePlex. It is failing with this message: "The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered." I am not able to open SharePoint 2013 PowerShell. I receive that message. I have tried running PowerShell as an administrator. The installation process fails, so the SharePoint config databases are not being created, so I cannot assign permissions to anything in SQL. When I add -Version 2.0 to the PowerShell property target I receive the following message:
Add-PsSnapin : Cannot load Windows PowerShell snap-in Microsoft.SharePoint.PowerShell because of the following error: Could not load file or assembly
'file:///C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SharePoint.PowerShell\v4.0_15.0.0.0__71E9BCE111E9429C\Microsoft.SharePoint.PowerShell.dll'
or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
At C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\CONFIG\POWERSHELL\Registration\SharePoint.ps1:3 char:13
+ Add-PsSnapin <<<< Microsoft.SharePoint.PowerShell
+ CategoryInfo : InvalidArgument: (Microsoft.SharePoint.PowerShell:String) [Add-PSSnapin], PSSnapInException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
I am not sure what else to do or try. Nothing seems to work. Can anyone help? I am not seeing anything in SharePoint logs and nothing really helpful in event log.