Get‑SqlDscRSConfigFile - dsccommunity/SqlServerDsc GitHub Wiki
Gets the RsReportServer.config configuration file as an XML object.
Get-SqlDscRSConfigFile -InstanceName <String> [<CommonParameters>]
Get-SqlDscRSConfigFile -SetupConfiguration <Object> [<CommonParameters>]
Get-SqlDscRSConfigFile -Path <String> [<CommonParameters>]
Gets the RsReportServer.config configuration file for SQL Server Reporting Services (SSRS) or Power BI Report Server (PBIRS) as an XML document object. This allows programmatic access to configuration settings using standard XML navigation or XPath queries.
The configuration file path is automatically determined from the
instance's setup configuration in the registry when using the
InstanceName or SetupConfiguration parameter.
Alternatively, a direct
file path can be specified using the Path parameter.
Get-SqlDscRSConfigFile -InstanceName 'SSRS'
Returns the rsreportserver.config file content as an XML object for the SSRS instance.
Get-SqlDscRSConfigFile -InstanceName 'PBIRS'
Returns the rsreportserver.config file content as an XML object for the Power BI Report Server instance.
Get-SqlDscRSSetupConfiguration -InstanceName 'SSRS' | Get-SqlDscRSConfigFile
Gets the setup configuration for SSRS and pipes it to Get-SqlDscRSConfigFile to retrieve the configuration file as XML.
Get-SqlDscRSConfigFile -Path 'C:\Backup\rsreportserver.config'
Reads the configuration file from the specified path.
$config = Get-SqlDscRSConfigFile -InstanceName 'SSRS'
$config.Configuration.Service.IsSchedulingService
Gets the config file and accesses the scheduling service setting directly using dot notation.
$config = Get-SqlDscRSConfigFile -InstanceName 'SSRS'
$config.SelectSingleNode('//Authentication/AuthenticationTypes')
Uses XPath to query the authentication types configuration section.
$config = Get-SqlDscRSConfigFile -InstanceName 'SSRS'
$config.SelectNodes('//Extension[@Name]') | ForEach-Object { $_.Name }
Uses XPath to list all extension names defined in the configuration.
$config = Get-SqlDscRSConfigFile -InstanceName 'SSRS'
$config.Configuration.URLReservations.Application |
Where-Object { $_.Name -eq 'ReportServerWebService' } |
Select-Object -ExpandProperty URLs
Gets the URL reservations for the Report Server Web Service application.
$config = Get-SqlDscRSConfigFile -InstanceName 'SSRS'
$smtpServer = $config.SelectSingleNode('//RSEmailDPConfiguration/SMTPServer')
if ($smtpServer) { $smtpServer.InnerText }
Uses XPath to retrieve the SMTP server configuration for email delivery.
Specifies the name of the Reporting Services instance. This is typically 'SSRS' for SQL Server Reporting Services or 'PBIRS' for Power BI Report Server. This parameter is mandatory when not passing a configuration object or a direct path.
Type: String
Parameter Sets: ByInstanceName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the direct path to the RsReportServer.config file. Use this parameter to read configuration files from non-standard locations or backup copies.
Type: String
Parameter Sets: ByPath
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the configuration object from Get-SqlDscRSSetupConfiguration.
This can be piped from Get-SqlDscRSSetupConfiguration.
The object must
have a ConfigFilePath property containing the path to the configuration
file.
This parameter accepts pipeline input.
Type: Object
Parameter Sets: ByConfiguration
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
For more information about the RsReportServer.config configuration file, see the Microsoft documentation: https://learn.microsoft.com/en-us/sql/reporting-services/report-server/rsreportserver-config-configuration-file