Skip to content

Commit 7ebebc6

Browse files
committed
Refactor Get-TargetResource to remove ServiceName assignment and update Set-TargetResource to use correct service name reference for Restart-ReportingServicesService
1 parent b03db41 commit 7ebebc6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/DSCResources/DSC_SqlRS/DSC_SqlRS.psm1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ function Get-TargetResource
5656
InstanceName = $InstanceName
5757
DatabaseServerName = $DatabaseServerName
5858
DatabaseInstanceName = $DatabaseInstanceName
59-
ServiceName = $null
6059
ReportServerVirtualDirectory = $null
6160
ReportsVirtualDirectory = $null
6261
ReportServerReservedUrl = $null
@@ -839,7 +838,7 @@ function Set-TargetResource
839838
elseif ( $restartReportingService -and (-not $SuppressRestart) )
840839
{
841840
Write-Verbose -Message $script:localizedData.Restart
842-
Restart-ReportingServicesService -ServiceName $currentConfig.ServiceName -WaitTime 30
841+
Restart-ReportingServicesService -ServiceName $reportingServicesData.Configuration.ServiceName -WaitTime 30
843842

844843
<#
845844
Wait for the service to be fully ready after restart before attempting

0 commit comments

Comments
 (0)