Try adding "-confirm:$false" to the command.
Command line to remove confirmation prompt | Remove-CMContentDistribution
Hello Team,
please let me know how to execute the command without confirmation prompt like below
Remove-CMContentDistribution -PackageId "CON0003A" -DistributionPointName "DP-Contoso.COM"
Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Intune | Configuration Manager | Other
2 answers
Sort by: Most helpful
-
-
Simon Ren-MSFT 40,341 Reputation points Microsoft External Staff
2025-01-20T02:12:48.4833333+00:00 Hi,
Thanks very much for your feedback and sharing. We're glad that the issue is gone now. It's appreciated that you could click "Accept Answer" to the helpful reply, this will help other users to search for useful information more quickly. Here's a short summary of the problem.
Problem/Symptom:
How to execute the Remove-CMContentDistribution command without confirmation prompt.
Solution/Workaround:
Try using "-Force" with the command and it's working.
Thanks again for your time. Have a nice day!
Best regards,
Simon
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.