You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring:
On line 165 of SQLAlias the registry key for the 32 bit alias is created. On a new test environment, the MSSQLServer key (and all child keys) didn't exist yet, resulting in an error when creating the key.
After some troubleshooting I found that New-Item only creates child keys when the parent exists. When the parent does not exist, an error is thrown. This can be resolved by adding the -Force parameter to the cmdlet.
This change is also required for line 152.
The DSC configuration that is using the resource (as detailed as possible):
SQLAlias Alias
{
Ensure = "Present"
Name = "DBServer"
ServerName = "serverx.domain.com"
Protocol = 'TCP'
TcpPort = 1433
}
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
Windows Server 2016
What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
xSQLServer 9.0
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
9.0
The text was updated successfully, but these errors were encountered:
Details of the scenario you tried and the problem that is occurring:
On line 165 of SQLAlias the registry key for the 32 bit alias is created. On a new test environment, the MSSQLServer key (and all child keys) didn't exist yet, resulting in an error when creating the key.
After some troubleshooting I found that New-Item only creates child keys when the parent exists. When the parent does not exist, an error is thrown. This can be resolved by adding the -Force parameter to the cmdlet.
This change is also required for line 152.
The DSC configuration that is using the resource (as detailed as possible):
SQLAlias Alias
{
Ensure = "Present"
Name = "DBServer"
ServerName = "serverx.domain.com"
Protocol = 'TCP'
TcpPort = 1433
}
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
Windows Server 2016
What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
xSQLServer 9.0
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
9.0
The text was updated successfully, but these errors were encountered: