How do I install SQL Server with DSC?

Welcome Forums DSC (Desired State Configuration) How do I install SQL Server with DSC?

This topic contains 1 reply, has 2 voices, and was last updated by

3 years ago.

  • Author
  • #38565

    Topics: 24
    Replies: 8
    Points: 0
    Rank: Member

    I am using this video ( to install SQL Server 2014.

    I see this error after I run start-dscconfiguration SqlServerInstall -Wait Verbose:

    "PowerShell provider MSFT_xSqlServerInstall failed to execute Set-TargetResource functionality with error message: SQL Server installation did not succeed. Form more details ...

    The SendConfigurationApply function did not succeed..."

    What do I do with the error above? It happens after several minutes of processing.
    The DSC that I run above (despite the error) installs SQL Server 2014 Configuration Manager and SQL Server 2014 Error and Usage Reporting. The media can install SSMS and SQL Server Profiler too. I want all the features/options that are normally installed. What should I do?

    Must I modify the MSFT_xSqlServerInstall.psm1 file? I am using PowerShell version 4. Some of the examples on the Internet are geared toward PS v.5.

  • #38566

    Topics: 9
    Replies: 2322
    Points: 0
    Rank: Member

    The xSqlServer module has been pretty extensively updated; you should check out the latest version. That particular resource has been renamed to xSqlServerSetup, I believe, and there are lots of new resources in the module that go above and beyond what little bit was in the original:

    ImplementedAs Name                              ModuleName Version Properties
    ------------- ----                              ---------- ------- ----------
    PowerShell    xSQLDatabaseRecoveryModel         xSQLServer {DatabaseName, RecoveryModel, SqlServerInstance, DependsOn...}
    PowerShell    xSQLServerDatabase                xSQLServer {Database, DependsOn, Ensure, PsDscRunAsCredential...}
    PowerShell    xSQLServerDatabaseOwner           xSQLServer {Database, Name, DependsOn, PsDscRunAsCredential...}
    PowerShell    xSQLServerDatabasePermissions     xSQLServer {Database, Name, Permissions, DependsOn...}
    PowerShell    xSQLServerDatabaseRole            xSQLServer {Database, Name, Role, DependsOn...}
    PowerShell    xSQLServerFailoverClusterSetup    xSQLServer {Action, FailoverClusterNetworkName, Features, InstanceName...}
    PowerShell    xSQLServerFirewall                xSQLServer {Features, InstanceName, DependsOn, Ensure...}
    PowerShell    xSQLServerLogin                   xSQLServer {Name, DependsOn, Ensure, LoginCredential...}
    PowerShell    xSQLServerMaxDop                  xSQLServer {DynamicAlloc, DependsOn, Ensure, MaxDop...}
    PowerShell    xSQLServerMemory                  xSQLServer {DynamicAlloc, DependsOn, Ensure, MaxMemory...}
    PowerShell    xSQLServerNetwork                 xSQLServer {InstanceName, ProtocolName, DependsOn, IsEnabled...}
    PowerShell    xSQLServerPowerPlan               xSQLServer {Ensure, DependsOn, PsDscRunAsCredential}
    PowerShell    xSQLServerRSConfig                xSQLServer {InstanceName, RSSQLInstanceName, RSSQLServer, SQLAdminCredential...}
    PowerShell    xSQLServerRSSecureConnectionLevel xSQLServer {InstanceName, SecureConnectionLevel, SQLAdminCredential, DependsOn...}
    PowerShell    xSQLServerSetup                   xSQLServer {InstanceName, SetupCredential, AgtSvcAccount, ASBackupDir...}

The topic ‘How do I install SQL Server with DSC?’ is closed to new replies.