Unable to Install FIM 2010 R2 – Services and Portal on SharePoint Foundation 2013

When you attempt to Install Forefront Identity Manager 2010 R2 - Services and Portal on SharePoint Foundation 2013, You encounter following error “The features you have the following prerequisites, Refer to the installation guide for more information. Please update your machine and retry the installation. – SharePoint.”

Prerequisites and Verification Steps:
=====================================
1. The SharePoint 2013 site collection runs in 2010 experience mode.

To verify, in the SharePoint 2013 Management command-line shell, enter the following commands and verify that the return value is 14:

$spSite = SpSite("https://fimportal");
$spSite.CompatibilityLevel

2. Server-side viewstate needs to be disabled.

To disable server-side viewstate, perform the following steps in the SharePoint 2013 Management command-line shell:

$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService;
$contentService.ViewStateOnServer = $false;
$contentService.Update();

3. Self-service upgrades on SharePoint Foundation 2013 from SharePoint 2010 experience mode to 2013 experience mode are disallowed.

To disallow, perform the following steps in the SharePoint 2013 Management command-line shell:

$spSite = SpSite("https://fimportal");
$spSite.AllowSelfServiceUpgrade = $false

4. Claims-based authentication needs to be off.

To verify, in the SharePoint 2013 Management command-line shell, enter the following commands:

$webapp = Get-SPWebApplication " https://fimportal"
$webapp.UseClaimsAuthentication

If claims-based authentication is on, you need to delete the existing default SharePoint web application (running on https://fimportal/) and create a new one with classic-mode Windows authentication.

In SharePoint 2013, creating a new SharePoint web application with classic-mode Windows Authentication can be only accomplished through PowerShell by entering the following commands:

$adminCredentials = get-credential domain\AppPoolAccount
$adminManagedAccount = New-SPManagedAccount -Credential $adminCredentials

New-SpWebApplication -Name "FIM Portal" -ApplicationPool "FIMAppPool" -AuthenticationMethod "Kerberos" -ApplicationPoolAccount $adminManagedAccount -Port 80 -URL https://FIMPORTAL

=========================

Note: Only Forefront Identity Manager 2010 R2 with Sp1 and above can detect SharePoint 2013. All older version will continue to error despite setting up SharePoint as per the above steps.