17 April 2014

Install Exchange 2010 Prerequisites on Windows 7 with Powershell (CMD)

Scripting your IIS and .NET 3.5 prerequisites for Exchange 2010 on Windows 7:

IIS:

dism /online /enable-feature /featurename:IIS-WebServerRole  /featurename:IIS-WebServerManagementTools /featurename:IIS-IIS6ManagementCompatibility /featurename:IIS-Metabase /featurename:IIS-LegacySnapIn

.NET 3.5:
Write-Host "Installing .Net Framework 3.5, do not close this prompt..." 
                    DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:$LocalSource | Out-Null  
                    $Result = Dism /online /Get-featureinfo /featurename:NetFx3 
                    If($Result -contains "State : Enabled") 
                    { 
                        Write-Host "Install .Net Framework 3.5 successfully." 
                    } 
                    Else 
                    { 
                        Write-Host "Failed to install Install .Net Framework 3.5,please make sure the local source is correct." 
                    }
In case the above doesn't work, you can try:
DISM /Online /Enable-Feature /FeatureName:NetFx3

Source

No comments:

Post a Comment