-
Notifications
You must be signed in to change notification settings - Fork 225
SqlRSSetup
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
InstanceName | Key | String | Name of the Microsoft SQL Server Reporting Service instance to installed. This can only be set to 'SSRS' . |
SSRS |
IAcceptLicenseTerms | Required | String | Accept licens terms. This must be set to 'Yes' . |
Yes |
SourcePath | Required | String | The path to the installation media file to be used for installation, e.g an UNC path to a shared resource. Environment variables can be used in the path. | |
Action | Write | String | The action to be performed. Default value is 'Install' which performs either install or upgrade. |
Install , Uninstall
|
SourceCredential | Write | PSCredential | Credentials used to access the path set in the parameter SourcePath. | |
SuppressRestart | Write | Boolean | Suppresses any attempts to restart. | |
ProductKey | Write | String | Sets the custom license key, e.g. '12345-12345-12345-12345-12345' . This parameter is mutually exclusive with the parameter Edition. |
|
ForceRestart | Write | Boolean | Forces a restart after installation is finished. If set to $true then it will override the parameter SuppressRestart. |
|
EditionUpgrade | Write | Boolean | Upgrades the edition of the installed product. Requires that either the ProductKey or the Edition parameter is also assigned. By default no edition upgrade is performed. | |
VersionUpgrade | Write | Boolean | Upgrades installed product version if the major product version of the source executable is higher than the currently installed major version. Requires that either the ProductKey or the Edition parameter is also assigned. Default is $false . |
|
Edition | Write | String | Sets the custom free edition. This parameter is mutually exclusive with the parameter ProductKey. |
Development , Evaluation , ExpressAdvanced
|
LogPath | Write | String | Specifies the setup log file location, e.g. log.txt . By default log files are created under %TEMP% . |
|
InstallFolder | Write | String | Sets the install folder, e.g. C:\Program Files\SSRS . Default value is C:\Program Files\Microsoft SQL Server Reporting Services . |
|
SetupProcessTimeout | Write | UInt32 | The timeout, in seconds, to wait for the setup process to finish. Default value is 7200 seconds (2 hours). If the setup process does not finish before this time an error will be thrown. |
|
ErrorDumpDirectory | Read | String | Returns the path to error dump log files. | |
CurrentVersion | Read | String | Returns the current version of the installed Microsoft SQL Server Reporting Service instance. | |
ServiceName | Read | String | Returns the current name of the Microsoft SQL Server Reporting Service instance Windows service. |
The SqlRSSetup
DSC resource installs the standalone
Microsoft SQL Server Reporting Services.
If both SourceCredential
and PsDscRunAsCredential
is used then the
credentials in SourceCredential
will only be used to copy the
installation media locally, and then the credentials in PsDscRunAsCredential
will be used during installation. If PsDscRunAsCredential
is not
used, then the installation will run as SYSTEM.
To install Microsoft SQL Server Reporting Services 2016 (or older), please use the resource SqlSetup.
- Target machine must be running Windows Server 2012 or later.
- If
PsDscRunAsCredential
common parameter is used to run the resource, the specified credential must have permissions to connect to the location where the Microsoft SQL Server Reporting Services media is placed. - The parameter IAcceptLicenseTerms must be set to 'Yes'.
- The parameter InstanceName can only be set to 'SSRS' since there is no way to change the instance name.
- When using action 'Uninstall', the same version of the executable as the version of the installed product must be used. If not, sometimes the uninstall is successful (because the executable returns exit code 0) but the Microsoft SQL Server Reporting Services instance was not actually removed.
Important
When using the action 'Uninstall' and the target node to begin with requires a restart, on the first run the Microsoft SQL Server Reporting Services instance will not be uninstalled, but instead exits with code 3010 and the node will be, by default, restarted. On the second run after restart, the Microsoft SQL Server Reporting Services instance will be uninstalled. If the parameter SuppressRestart is used, then the node must be restarted manually before the Microsoft SQL Server Reporting Services instance will be successfully uninstalled.
The Microsoft SQL Server Reporting Services log will indicate that a
restart is required by outputting; "No action was taken as a system
reboot is required (0x8007015E)". The log is default located in the
SSRS folder in %TEMP%
, e.g. C:\Users\<user>\AppData\Local\Temp\SSRS
.
All issues are not listed here, see here for all open issues.
This example shows how to install a Microsoft SQL Server Reporting Service instance (2017 or newer).
Configuration Example
{
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$SqlInstallCredential
)
Import-DscResource -ModuleName 'SqlServerDsc'
node localhost
{
SqlRSSetup 'InstallDefaultInstance'
{
InstanceName = 'SSRS'
IAcceptLicenseTerms = 'Yes'
SourcePath = 'C:\InstallMedia\SQLServerReportingServices.exe'
Edition = 'Development'
PsDscRunAsCredential = $SqlInstallCredential
}
}
}
This example shows how to install a Microsoft SQL Server Reporting Service instance (2017 or newer).
Configuration Example
{
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$SqlInstallCredential
)
Import-DscResource -ModuleName 'SqlServerDsc'
node localhost
{
SqlRSSetup 'InstallDefaultInstance'
{
InstanceName = 'SSRS'
SourcePath = 'C:\InstallMedia\SQLServerReportingServices.exe'
Action = 'Uninstall'
# This needs to be set to although it is not used during uninstall.
IAcceptLicenseTerms = 'Yes'
PsDscRunAsCredential = $SqlInstallCredential
}
}
}
- Add-SqlDscNode
- Add-SqlDscTraceFlag
- Complete-SqlDscFailoverCluster
- Complete-SqlDscImage
- Connect-SqlDscDatabaseEngine
- ConvertFrom-SqlDscDatabasePermission
- ConvertFrom-SqlDscServerPermission
- ConvertTo-SqlDscDatabasePermission
- ConvertTo-SqlDscServerPermission
- Disable-SqlDscAudit
- Disconnect-SqlDscDatabaseEngine
- Enable-SqlDscAudit
- Get-SqlDscAudit
- Get-SqlDscConfigurationOption
- Get-SqlDscDatabasePermission
- Get-SqlDscManagedComputer
- Get-SqlDscManagedComputerService
- Get-SqlDscPreferredModule
- Get-SqlDscServerPermission
- Get-SqlDscStartupParameter
- Get-SqlDscTraceFlag
- Import-SqlDscPreferredModule
- Initialize-SqlDscRebuildDatabase
- Install-SqlDscServer
- Invoke-SqlDscQuery
- New-SqlDscAudit
- Remove-SqlDscAudit
- Remove-SqlDscNode
- Remove-SqlDscTraceFlag
- Repair-SqlDscServer
- Save-SqlDscSqlServerMediaFile
- Set-SqlDscAudit
- Set-SqlDscDatabasePermission
- Set-SqlDscServerPermission
- Set-SqlDscStartupParameter
- Set-SqlDscTraceFlag
- Test-SqlDscIsDatabasePrincipal
- Test-SqlDscIsLogin
- Test-SqlDscIsSupportedFeature
- Uninstall-SqlDscServer
- SqlAG
- SqlAGDatabase
- SqlAgentAlert
- SqlAgentFailsafe
- SqlAgentOperator
- SqlAGListener
- SqlAGReplica
- SqlAlias
- SqlAlwaysOnService
- SqlAudit
- SqlConfiguration
- SqlDatabase
- SqlDatabaseDefaultLocation
- SqlDatabaseMail
- SqlDatabaseObjectPermission
- SqlDatabasePermission
- SqlDatabaseRole
- SqlDatabaseUser
- SqlEndpoint
- SqlEndpointPermission
- SqlLogin
- SqlMaxDop
- SqlMemory
- SqlPermission
- SqlProtocol
- SqlProtocolTcpIp
- SqlReplication
- SqlRole
- SqlRS
- SqlRSSetup
- SqlScript
- SqlScriptQuery
- SqlSecureConnection
- SqlServiceAccount
- SqlSetup
- SqlTraceFlag
- SqlWaitForAG
- SqlWindowsFirewall