Command line to remove confirmation prompt | Remove-CMContentDistribution

Boopathi S 3,601 Reputation points
2025-01-16T11:47:30.75+00:00

Hello Team,

please let me know how to execute the command without confirmation prompt like below

Remove-CMContentDistribution -PackageId "CON0003A" -DistributionPointName "DP-Contoso.COM"

removeconent

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,609 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. MotoX80 35,141 Reputation points
    2025-01-16T13:49:20.9166667+00:00

    Try adding "-confirm:$false" to the command.

    1 person found this answer helpful.

  2. Simon Ren-MSFT 38,406 Reputation points Microsoft Vendor
    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.

    command

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.