Test‑SqlDscRSInitialized - dsccommunity/SqlServerDsc GitHub Wiki

SYNOPSIS

Tests if SQL Server Reporting Services is initialized.

SYNTAX

Test-SqlDscRSInitialized [-Configuration] <Object> [<CommonParameters>]

DESCRIPTION

Tests if SQL Server Reporting Services or Power BI Report Server is initialized by checking the IsInitialized property on the MSReportServer_ConfigurationSetting CIM instance.

A Reporting Services instance is considered initialized when:

  • The report server database is configured
  • The encryption keys are set up
  • The service is ready to serve reports

The configuration CIM instance can be obtained using the Get-SqlDscRSConfiguration command and passed via the pipeline.

EXAMPLES

EXAMPLE 1

Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Test-SqlDscRSInitialized

Returns $true if the Reporting Services instance 'SSRS' is initialized.

EXAMPLE 2

$config = Get-SqlDscRSConfiguration -InstanceName 'SSRS'
if (Test-SqlDscRSInitialized -Configuration $config) {
    Write-Information -MessageData 'Reporting Services is initialized' -InformationAction Continue
}

Tests if Reporting Services is initialized and performs an action.

PARAMETERS

-Configuration

Specifies the MSReportServer_ConfigurationSetting CIM instance for the Reporting Services instance. This can be obtained using the Get-SqlDscRSConfiguration command. This parameter accepts pipeline input.

Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.Management.Infrastructure.CimInstance

Accepts MSReportServer_ConfigurationSetting CIM instance via pipeline.

OUTPUTS

System.Boolean

Returns $true if the Reporting Services instance is initialized,

$false otherwise.

NOTES

This is a convenience wrapper around checking the IsInitialized property of the configuration CIM instance.

RELATED LINKS

https://docs.microsoft.com/en-us/sql/reporting-services/wmi-provider-library-reference/msreportserver-configurationsetting-properties

⚠️ **GitHub.com Fallback** ⚠️