Set‑SqlDscRSUrlReservation - dsccommunity/SqlServerDsc GitHub Wiki
Sets the URL reservations for a SQL Server Reporting Services or Power BI Report Server application to the specified list, or recreates all existing URL reservations.
Set-SqlDscRSUrlReservation -Configuration <Object> -Application <String> -UrlString <String[]> [-Lcid <Int32>]
[-PassThru] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-SqlDscRSUrlReservation -Configuration <Object> [-Lcid <Int32>] [-PassThru] [-Force] [-RecreateExisting]
[-WhatIf] [-Confirm] [<CommonParameters>]
The Set-SqlDscRSUrlReservation command can operate in two modes:
Set Mode (default): Ensures that only the specified URL reservations exist for the given application. It removes any existing URL reservations that are not in the specified list and adds any URLs that are not currently reserved.
Recreate Mode: When using the -RecreateExisting parameter, the command
removes and re-adds all existing URL reservations for all applications.
This is useful after changing the Windows service account, as URL reservations
are tied to a specific service account and must be recreated to use the
new account.
This command uses the Get-SqlDscRSUrlReservation, Add-SqlDscRSUrlReservation,
and Remove-SqlDscRSUrlReservation commands internally.
$config = Get-SqlDscRSConfiguration -InstanceName 'SSRS'
$config | Set-SqlDscRSUrlReservation -Application 'ReportServerWebService' -UrlString 'http://+:80', 'https://+:443' -Force
Sets the URL reservations for the ReportServerWebService application to only 'http://+:80' and 'https://+:443'. Any other existing reservations for this application will be removed.
$config = Get-SqlDscRSConfiguration -InstanceName 'PBIRS'
$config | Set-SqlDscRSUrlReservation -Application 'ReportServerWebApp' -UrlString 'http://+:80' -Force -PassThru
Sets the URL reservations for the ReportServerWebApp application on a Power BI Report Server instance and returns the configuration object.
$config = Get-SqlDscRSConfiguration -InstanceName 'SSRS'
$config | Set-SqlDscRSUrlReservation -RecreateExisting -Force
Recreates all existing URL reservations for all applications. This is useful after changing the service account to update the reservations to use the new account.
Specifies the Reporting Services application for which to set URL reservations. Valid values are: ReportServerWebService, ReportServerWebApp, ReportManager. This parameter is only used in Set mode.
Type: String
Parameter Sets: Set
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the Reporting Services configuration CIM instance.
This is typically
obtained by calling the Get-SqlDscRSConfiguration command.
Type: Object
Parameter Sets: (All)
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: FalseSpecifies the locale identifier (LCID) for the URL reservation.
If not
specified, the operating system language code is used.
Note that the
LCID used when creating a URL reservation is not stored or retrievable,
so when using -RecreateExisting, the LCID cannot be determined from
the existing reservations and defaults to the OS language.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: FalseIf specified, returns the Reporting Services configuration CIM instance.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseIf specified, removes and re-adds all existing URL reservations for all
applications.
This is useful after changing the Windows service account,
as URL reservations are tied to a specific service account and must be
recreated to use the new account.
This parameter cannot be used with
-Application or -UrlString.
Type: SwitchParameter
Parameter Sets: Recreate
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies one or more URL strings to reserve. Any existing URL reservations for the application that are not in this list will be removed. This parameter is only used in Set mode.
Type: String[]
Parameter Sets: Set
Aliases:
Required: True
Position: Named
Default value: None
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.
This command calls the ReserveUrl and RemoveURL methods on the MSReportServer_ConfigurationSetting CIM class.