The term 'Remove-CMContentDistribution' is not recognized as the name of a cmdlet, function, script file, or operable program

Boopathi Subramaniam 3,196 Reputation points
2021-08-20T15:30:08.953+00:00

Hello,

Opened ConfigMgr Console as Administrator. Then opened the PowerShell ISE from the console.
Below message appears when i execute a powershell command.

The term 'Remove-CMContentDistribution' is not recognized as the name of a cmdlet, function, script file, or operable program
125029-remove-cmcotentdistribution.jpg

Please help what is the thing i am doing wrongly

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,359 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. AllenLiu-MSFT 40,081 Reputation points Microsoft Vendor
    2021-08-23T06:20:50.373+00:00

    Hi, @Boopathi Subramaniam
    Thank you for posting in Microsoft Q&A forum.

    When you open the PowerShell ISE from the console, did you see the script like below? We should run this script first to import the ConfigurationManager.psd1 module and set the current location to be the site code.
    125420-1.jpg


    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.


3 additional answers

Sort by: Most helpful
  1. Rich Matheisen 44,776 Reputation points
    2021-08-20T18:40:54.417+00:00

    Does it work if you add "Import-Module ConfigurationManager" at the beginning of your script?

    0 comments No comments

  2. Boopathi Subramaniam 3,196 Reputation points
    2021-08-20T19:12:48.04+00:00

    Hello RichMatheisen,

    Thanks for the reply.

    Getting the below message. 125161-capture.jpg

    Please help.


  3. Jason Sandys 31,151 Reputation points Microsoft Employee
    2021-08-20T20:01:39.517+00:00

    Please see https://learn.microsoft.com/en-us/powershell/sccm/overview?view=sccm-ps on how to get started with the ConfigMgr and PowerShell including things like launching a PowerShell prompt from the ConfigMgr console and how to import the module on systems where the console is already installed.

    0 comments No comments