|
294 | 294 | .PARAMETER AllowUpgradeForSSRSSharePointMode |
295 | 295 | See the notes section for more information. |
296 | 296 |
|
| 297 | + .PARAMETER AllowDqRemoval |
| 298 | + Specifies whether to allow removal of Data Quality (DQ) Services during |
| 299 | + upgrade to SQL Server 2025 (17.x) and later versions. |
| 300 | +
|
297 | 301 | .PARAMETER NpEnabled |
298 | 302 | See the notes section for more information. |
299 | 303 |
|
|
476 | 480 | #> |
477 | 481 | function Invoke-SetupAction |
478 | 482 | { |
479 | | - # cSpell: ignore PBDMS Admini AZUREEXTENSION BSTR |
| 483 | + # cSpell: ignore PBDMS Admini AZUREEXTENSION BSTR QUIETSIMPLE |
480 | 484 | [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')] |
481 | 485 | [OutputType()] |
482 | 486 | param |
@@ -1210,6 +1214,10 @@ function Invoke-SetupAction |
1210 | 1214 | [System.Management.Automation.SwitchParameter] |
1211 | 1215 | $AllowUpgradeForSSRSSharePointMode, |
1212 | 1216 |
|
| 1217 | + [Parameter(ParameterSetName = 'Upgrade')] |
| 1218 | + [System.Management.Automation.SwitchParameter] |
| 1219 | + $AllowDqRemoval, |
| 1220 | + |
1213 | 1221 | [Parameter(ParameterSetName = 'Install')] |
1214 | 1222 | [Parameter(ParameterSetName = 'InstallRole')] |
1215 | 1223 | [Parameter(ParameterSetName = 'CompleteImage')] |
@@ -1428,7 +1436,16 @@ function Invoke-SetupAction |
1428 | 1436 |
|
1429 | 1437 | $ErrorActionPreference = $originalErrorActionPreference |
1430 | 1438 |
|
1431 | | - $setupArgument = '/QUIET /ACTION={0}' -f $setupAction |
| 1439 | + if ($VerbosePreference -eq 'Continue') |
| 1440 | + { |
| 1441 | + $quietMode = '/QUIETSIMPLE' |
| 1442 | + } |
| 1443 | + else |
| 1444 | + { |
| 1445 | + $quietMode = '/QUIET' |
| 1446 | + } |
| 1447 | + |
| 1448 | + $setupArgument = '{0} /ACTION={1}' -f $quietMode, $setupAction |
1432 | 1449 |
|
1433 | 1450 | if ($DebugPreference -in @('Continue', 'Inquire')) |
1434 | 1451 | { |
@@ -1534,23 +1551,25 @@ function Invoke-SetupAction |
1534 | 1551 | # Must be handled differently because the parameter name could not be $PID. |
1535 | 1552 | 'PRODUCTKEY' # cspell: disable-line |
1536 | 1553 | { |
1537 | | - # Remove the argument that was added above. |
1538 | | - $setupArgument = $setupArgument -replace ' \/{0}' -f $parameterName |
1539 | | - |
1540 | 1554 | $sensitiveValue += $PSBoundParameters.$parameterName |
1541 | 1555 |
|
1542 | | - $setupArgument += ' /PID="{0}"' -f $PSBoundParameters.$parameterName |
| 1556 | + $setupArgument = $setupArgument -replace $parameterName, ('PID="{0}"' -f $PSBoundParameters.$parameterName) |
1543 | 1557 |
|
1544 | 1558 | break |
1545 | 1559 | } |
1546 | 1560 |
|
1547 | 1561 | # Must be handled differently because the argument name shall have an underscore in the argument. |
1548 | 1562 | 'SQLINSTJAVA' # cspell: disable-line |
1549 | 1563 | { |
1550 | | - # Remove the argument that was added above. |
1551 | | - $setupArgument = $setupArgument -replace ' \/{0}' -f $parameterName |
| 1564 | + $setupArgument = $setupArgument -replace $parameterName, 'SQL_INST_JAVA' |
1552 | 1565 |
|
1553 | | - $setupArgument += ' /SQL_INST_JAVA' |
| 1566 | + break |
| 1567 | + } |
| 1568 | + |
| 1569 | + # Must be handled differently because parameter name does not match the argument name. |
| 1570 | + 'ALLOWDQREMOVAL' # cspell: disable-line |
| 1571 | + { |
| 1572 | + $setupArgument = $setupArgument -replace $parameterName, 'IACKNOWLEDGEDQUNINSTALL' # cspell: disable-line |
1554 | 1573 |
|
1555 | 1574 | break |
1556 | 1575 | } |
|
0 commit comments