Add should process support for remove d365database#881
Conversation
This pull request was automatically created by the d365fo.tools-Generate-Text action'
|
@Splaxi This will break Remove-D365Database for existing users that do not expect a confirmation prompt when running the command. My guess is not many are using this command and its main use is as part of New-D365Bacpac, where the confirmation prompt is suppressed. One alternative I can think of (well, besides just not making the change) is to lower the |
|
I would like to go beyond and above to avoid breaking changes. So let's handle the level and test things |
With default PowerShell setting of High for $ConfirmPreference, this will not result in a confirmation prompt when executing the cmdlet. This prevents a breaking change. d365collaborative#879
This pull request was automatically created by the d365fo.tools-Generate-Text action'
|
Alright, I changed the impact level to Medium. In turn, I added some documentation and console messages to make the impact of the command clearer. New behavior looks like this:
|

This pull request introduces several enhancements to the
Remove-D365Databasefunction and its usage in theNew-D365Bacpacfunction. The key changes include adding new parameters to improve user control and updating documentation and tests accordingly.fixes #879
Enhancements to
Remove-D365Databasefunction:-Confirm,-WhatIf, and-Forceparameters toRemove-D365Databaseto provide better control over command execution and user confirmation. (d365fo.tools/functions/remove-d365database.ps1, [1] [2] [3]ShouldProcessfor high-impact actions, ensuring users are prompted for confirmation before executing critical steps. (d365fo.tools/functions/remove-d365database.ps1, d365fo.tools/functions/remove-d365database.ps1R89-R99)Updates to
New-D365Bacpacfunction:Remove-D365Databaseto include-Confirm:$false, bypassing confirmation prompts during automated processes. (d365fo.tools/functions/new-d365bacpac.ps1, [1] [2]Documentation updates:
Remove-D365Databasedocumentation to include descriptions and usage examples for the new-Confirm,-WhatIf, and-Forceparameters. (docs/Remove-D365Database.md, [1] [2]Testing enhancements:
-Forceparameter inRemove-D365Database. (d365fo.tools/tests/functions/Remove-D365Database.Tests.ps1, d365fo.tools/tests/functions/Remove-D365Database.Tests.ps1R79-R97)