Restart‑SqlDscRSService - dsccommunity/SqlServerDsc GitHub Wiki
Restarts a SQL Server Reporting Services instance.
Restart-SqlDscRSService -ServiceName <String> [-WaitTime <UInt16>] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
Restart-SqlDscRSService -Configuration <Object> [-WaitTime <UInt16>] [-PassThru] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
Restarts a SQL Server Reporting Services or Power BI Report Server Windows service. This command stops the service, optionally waits for a specified time, then starts the service again. It also restarts any dependent services that were running before the restart.
The command can be used in two ways:
- With a configuration CIM instance from
Get-SqlDscRSConfiguration - With a service name directly
Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Restart-SqlDscRSService
Restarts the Reporting Services instance 'SSRS'.
Restart-SqlDscRSService -ServiceName 'SQLServerReportingServices'
Restarts the Reporting Services service by name.
Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Restart-SqlDscRSService -WaitTime 30
Restarts the Reporting Services instance and waits 30 seconds between stopping and starting the service.
Restart-SqlDscRSService -ServiceName 'SQLServerReportingServices' -Force
Restarts the service without confirmation.
Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Restart-SqlDscRSService -PassThru
Restarts the service and returns the configuration CIM instance.
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: ByConfiguration
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseIf specified, suppresses the confirmation prompt.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseIf specified, returns the configuration CIM instance after restarting the service. Only applicable when using the Configuration parameter.
Type: SwitchParameter
Parameter Sets: ByConfiguration
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the name of the Reporting Services Windows service to restart. This parameter is used when the service name is known and a configuration object is not available.
Type: String
Parameter Sets: ByServiceName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the number of seconds to wait after stopping the service before starting it again. This can be useful to allow the service to fully release resources before restarting. Default value is 0 seconds.
Type: UInt16
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
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.
Dependent services that were running before the restart will be automatically restarted after the main service starts.
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/restart-service