Skip to content

Commit

Permalink
Uninstall-SqlDscServer: Now support argument `SuppressPrivacyStatem…
Browse files Browse the repository at this point in the history
…entNotice` (#1851)

- `Uninstall-SqlDscServer`
  - Now support the argument `SuppressPrivacyStatementNotice` (issue #1809).
  • Loading branch information
johlju authored Feb 12, 2023
1 parent ea2a62a commit 7a4620d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Uninstall-SqlDscServer`
- Was changed to support the SQL Server 2022 GA feature `AzureExtension`
(that replaced the feature name `ARC`) ([issue #1798](https://github.com/dsccommunity/SqlServerDsc/issues/1798)).
- Now support the argument `SuppressPrivacyStatementNotice` ([issue #1809](https://github.com/dsccommunity/SqlServerDsc/issues/1809)).
- `Import-SqlDscPreferredModule`
- No longer tries to get the environment variables from the machine state
when run on Linux or macOS. This will allow the unit tests to run
Expand Down
9 changes: 8 additions & 1 deletion source/Public/Uninstall-SqlDscServer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
.PARAMETER Features
See the notes section for more information.
.PARAMETER SuppressPrivacyStatementNotice
See the notes section for more information.
.LINK
https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt
Expand Down Expand Up @@ -104,7 +107,11 @@ function Uninstall-SqlDscServer

[Parameter()]
[System.Management.Automation.SwitchParameter]
$Force
$Force,

[Parameter()]
[System.Management.Automation.SwitchParameter]
$SuppressPrivacyStatementNotice
)

Invoke-SetupAction -Uninstall @PSBoundParameters -ErrorAction 'Stop'
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Public/Uninstall-SqlDscServer.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Describe 'Uninstall-SqlDscServer' -Tag 'Public' {
@{
MockParameterSetName = '__AllParameterSets'
# cSpell: disable-next
MockExpectedParameters = '[-MediaPath] <string> [-InstanceName] <string> [[-Features] <string[]>] [[-Timeout] <uint>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
MockExpectedParameters = '[-MediaPath] <string> [-InstanceName] <string> [[-Features] <string[]>] [[-Timeout] <uint>] [-Force] [-SuppressPrivacyStatementNotice] [-WhatIf] [-Confirm] [<CommonParameters>]'
}
) {
$result = (Get-Command -Name 'Uninstall-SqlDscServer').ParameterSets |
Expand Down

0 comments on commit 7a4620d

Please sign in to comment.