Skip to content

Instantly share code, notes, and snippets.

@andikrueger
Last active January 8, 2019 15:07
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/9d16a2c88c3c6e39f203f049723dea04 to your computer and use it in GitHub Desktop.
Save andikrueger/9d16a2c88c3c6e39f203f049723dea04 to your computer and use it in GitHub Desktop.
Create a SQL Server Alias basd on Configuration Data
$ConfigurationData.NonNodeData.SqlServerAlias | ForEach-Object -Process {
SqlAlias $_.Name
{
Name = $_.Name
ServerName = $_.ServerName
Protocol = $_.Protocol
UseDynamicTcpPort = $_.UseDynamicTcpPort
TcpPort = $_.TcpPort
Ensure = 'Present'
PsDscRunAsCredential = $SpSetupAccount
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment