Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Fixed Failover clustering setup on Windows Server 2012. #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion AutomatedDeployments/SQL/ProvisionSqlVm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,22 @@ Invoke-Command -ComputerName $uris[0].DnsSafeHost -Credential $localAdminCredent
{
Write-Host "Installing Failover-Clustering feature"
Import-Module ServerManager
Add-WindowsFeature 'Failover-Clustering', 'RSAT-Clustering'
$OsBuildNumber = [System.Environment]::OSVersion.Version.Build
if ($OsBuildNumber -lt 7600)
{
Write-Error "Not support on Windows Visa or lower"
exit 1
}
elseif ($OsBuildNumber -lt 9200)
{
Write-Output "Windows Server 2008 R2 detected"
Add-WindowsFeature 'Failover-Clustering', 'RSAT-Clustering'
}
else
{
Write-Output "Windows Server 2012 or above detected"
Add-WindowsFeature 'Failover-Clustering', 'RSAT-Clustering-PowerShell', 'RSAT-Clustering-CmdInterface'
}
}
else
{
Expand Down