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
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
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.
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.