Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add should process support for remove d365database #881

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

FH-Inway
Copy link
Member

This pull request introduces several enhancements to the Remove-D365Database function and its usage in the New-D365Bacpac function. The key changes include adding new parameters to improve user control and updating documentation and tests accordingly.

fixes #879

Enhancements to Remove-D365Database function:

  • Added -Confirm, -WhatIf, and -Force parameters to Remove-D365Database to provide better control over command execution and user confirmation. (d365fo.tools/functions/remove-d365database.ps1, [1] [2] [3]
  • Updated the function to support ShouldProcess for 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-D365Bacpac function:

  • Modified calls to Remove-D365Database to include -Confirm:$false, bypassing confirmation prompts during automated processes. (d365fo.tools/functions/new-d365bacpac.ps1, [1] [2]

Documentation updates:

  • Updated Remove-D365Database documentation to include descriptions and usage examples for the new -Confirm, -WhatIf, and -Force parameters. (docs/Remove-D365Database.md, [1] [2]

Testing enhancements:

@FH-Inway
Copy link
Member Author

@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 ConfirmImpact to Medium. This would result in no prompt unless someone sets the $ConfirmationPreference to Medium (default is High). This would probably not have prevented #879 even if advise is added to the ReadMe to run d365fo.tools with Medium ConfirmationPreference while one gets familiar with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvement that Remove-D365Database does require explicitly confirmation that AxDB is to be removed
1 participant