Skip to content

Instantly share code, notes, and snippets.

@andikrueger
Created January 8, 2019 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andikrueger/60f91b23a0590edacc6a9f3774f0a766 to your computer and use it in GitHub Desktop.
Save andikrueger/60f91b23a0590edacc6a9f3774f0a766 to your computer and use it in GitHub Desktop.
How to reuse the SQL Server Alias properly
Previously:
SPFarm SharePointFarm
{
DatabaseServer = ¯\_(ツ)_/¯
IsSingleInstance = "Yes"
FarmConfigDatabaseName = "SP_Config"
AdminContentDatabaseName = "SP_AdminContent"
Passphrase = $Passphrase
FarmAccount = $FarmAccount
RunCentralAdmin = $true
PsDscRunAsCredential = $SpSetupAccount
}
Now:
SPFarm SharePointFarm
{
DatabaseServer = $ConfigurationData.NonNodeData.SqlServerAlias.Config.Name
IsSingleInstance = "Yes"
FarmConfigDatabaseName = "SP_Config"
AdminContentDatabaseName = "SP_AdminContent"
Passphrase = $Passphrase
FarmAccount = $FarmAccount
RunCentralAdmin = $true
PsDscRunAsCredential = $SpSetupAccount
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment