Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

Apparently it is an out of the box Clear-TcmPublicationTarget cmdlet, but I never found it in my Tridion 2013 SP1 box.

Source: Ricks comment http://www.tridiondeveloper.com/decommission-a-publication-target

share|improve this question

2 Answers 2

You should only need to import the module and the cmdlet will be available:

Import-Module Tridion.ContentManager.Automation
Get-Command -Module Tridion.ContentManager.Automation

That will import the cmdlets and show you a list of them.

share|improve this answer
    
Brilliant! I could not find this in the manual. –  Jan H Mar 26 at 14:04
    

It works on my 2013 SP1 system.

First, I'd suggest using

get-module -listAvailable 

to see if the module assembly is somewhere where your powershell can find it automatically. On my system,

gci env:PSModulePath

shows the Tridion bin directory as being on the module path, and the module is listed as available.

import-module Tridion.contentmanager.automation

should then succeed, after which typing

clear-t 

followed by TAB-completion should find the Cmdlet for you.

If this fails, try using the overload of ipmo that accepts an assembly location as a parameter.

share|improve this answer
    
Thanks for your detailed answer :) –  Jan H Mar 26 at 14:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.