question

BoopathiSubramaniam-6294 avatar image
0 Votes"
BoopathiSubramaniam-6294 asked saldana-msft edited

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

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-powershellmem-cm-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AllenLiu-MSFT avatar image
0 Votes"
AllenLiu-MSFT answered BoopathiSubramaniam-6294 commented

Hi, @BoopathiSubramaniam-6294
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.



1.jpg (166.6 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello AllenLiu,

Your suggestions has worked. Thanks.

0 Votes 0 ·
RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered RichMatheisen-8856 edited

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BoopathiSubramaniam-6294 avatar image
0 Votes"
BoopathiSubramaniam-6294 answered RichMatheisen-8856 commented

Hello RichMatheisen,

Thanks for the reply.

Getting the below message. 125161-capture.jpg



Please help.


capture.jpg (82.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It's Import-Module

0 Votes 0 ·
Jason-MSFT avatar image
0 Votes"
Jason-MSFT answered

Please see https://docs.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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.