3

I tried to decomission a publishing target with PowerShell and Peter's Tridion Powershell Modules.

Running this simple script did not work for me, I keep getting the error Method invocation failed because [Tridion.ContentManager.CoreService.Client.SessionAwareCoreServiceClient] does not contain a method named 'DecomissionPublishingTarget'..

Set-TridionCoreServiceSettings -Version 2013-SP1
$client = Get-TridionCoreServiceClient
$client.DecomissionPublishingTarget("remove-me-tcm:0-1-65537")

Update: removed the ConnectionType setging from the script above, that has nothing to do with it, the DecomissionPublishingTarget should be available on sessionless clients as well. Added -Version setting cause this is for SDl Tridion 2013.

3

It works fine for me. It must be because it's not using the 2013 SP1 version of the client. Probably due to this known issue: First run connects to 2011 endpoint.

Try to persist your 2013 settings (add -persist to Set-TridionCoreServiceSettings) and try in a new PowerShell session. That should do the trick.

|improve this answer|||||
3

A helpful workaround is given by Peter earlier. You can use the built in PowerShell module.

Import-Module Tridion.ContentManager.Automation
Clear-TcmPublicationTarget "remove-me-tcm:0-1-65537" -Verbose

That works beautifully, but more of a workaround, no answer to the question.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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