18

Install the module Get the .psm1, .psd1 and DLL files from the project. You can also copy the CoreService DLL from the %TRIDION_HOME%bin\client\CoreService folder on your Content Manager Create a directory C:\Users\username\Documents\WindowsPowerShell\Modules\CoreService C:\Users\username\Documents\WindowsPowerShell\Modules\Tridion-CoreService Copy the ....


11

You can use powershell for re-indexing your search indexes. Execute Sync-TcmSearchIndex on powershell to reindex all publication Execute Sync-TcmSearchIndex with a TcmRepositoryIds parameter containing list of publication URIs if you want to re-index a set of publication or a specific publication Source and Reference: SDL Live Documentation


10

Your example seems to be correct (provided coreservice namespace is defined), the only problem is casing. It's [coreservice.RenderMode]::PreviewDynamic This in Powershell: $renderInstruction = new-object coreservice.RenderInstructionData -property @{RenderMode = [coreservice.RenderMode]::PreviewDynamic} Is this in C#: renderInstruction = new ...


8

The signature of Publish method in Powershell is like this: Publish(string[] ids, PublishInstructionData publishInstruction, string[] targets, Nullable`1 priority, boolean prioritySpecified, ReadOptions readOptions) So you are missing 1 parameter. Try: $client.publish($toPublish, $publishInstruction, @($targetId), $null, $false, $readOptions);


8

The thing is that powershell.config should be in the folder before Powershell is started. So it should work on second run. Also, try running your script directly and not from ISE. What is also worth checking is which Powershell you are running. Is it 32 or 64 bit? You can use procmon to see if config is actually being loaded and if so, from which location. ...


8

Short answer: Remove-TcmQueueMessages -Confirm:$false Explanation: The -Confirm switch is a standard parameter in PowerShell and actually indicates that you want it to ask you for confirmation before doing anything destructive / permanent. The companion switch is -WhatIf, which you can use to find out what the cmdlet would do, without it actually doing it....


8

What about just deleting the entire Publication?


8

Although it sounds like you now have this sorted, two possible alternatives (if you needed to keep the Publication) would have been: Update the Schemas of the remaining Components to remove the Component Link fields and the use the Component Synchroniser PowerTool to update the remaining Components and then delete them. (This is assuming that these Schemas ...


7

It's actually possible, but requires doing some hackwork. Use at own risk! Write-Host 'Hello World! Lets hack a Tridion Jvm!' # You'll need the assemblies listed below, plus xmogrt.dll # in your executing directory add-type -path '.\netrtsn.dll' add-type -path '.\Tridion.ContentDelivery.Configuration.dll' add-type -path '.\tridion.contentdelivery.dll' add-...


7

The first thing I'd check is what the error message says, so try these steps: Evaluate $pshome\powershell.exe.config in your powershell Check that there is a file there In the file, check that it is a valid configuration file, and that it describes an endpoint called wsHttp_2011 that matches the rest of the details specified. Do you already know that the ...


7

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.


6

It looks like $client isn't there any more. You could confirm this with the following test: $client -eq $null It can be as simple a thing as a timeout. Try getting a new $client and see if that works. My own experience is that the client times out pretty quickly, although usually the error is more WCF in style.


6

Being able to create a client and connect is not the same as trying to perform an action that requires permissions. The message you are seeing is coming from Tridion: it's telling you that it does not recognise your user as a 'trustee'. I see that you have chosen to say <domain\username> rather than giving the actual value, but is the real value an ...


6

On closer investigation of the Publication Object - this exposes the App Data as the ExtensionData as follows: $pubsList = Get-TridionPublications | Select-Object Title, Id, ExtensionData; This gives me the Application Data as System Object.


6

I found 2 very useful links one from the documentation and the other from Dominic's blog. Both of these provide details on all available cmdlets (commandlets). Dominic's blog goes a step further and explains how to get this information from available Modules. Also providing the way to look for parameters and help on these modules. There are a few more ...


6

You can establish a Core Service connection from Powershell to the CM and then use the Core Service API to perform the desired action. Just one question though, why do you need to remove schema fields from Powershell in the first place, for me it doesn't seem the most logical way/place to do it.


6

The ProcessSummary class does have methods that provide information with regards to the items exported/imported. The screen shot below is the preview of the ProcessSummary class in Visual Studio. To get the list of items that has been successfully imported use the DoneItems property. The Values contain the WebDAV URL of items. To determine if an imported ...


6

As noted, you can script this. In fact anything you can do on the GUI can be scripted - and this is certainly a good candidate. A couple of Points to note where you will need to consider a strategy: items that have been deleted may impact the ability to rollback items Items that have been unlocalised will not have any history items that have been ...


5

A few lines of PowerShell can do the trick and is a powerful toy for automated administrative tasks. 1: Install Tridion Powershell Modules. See the project on Google Code to download the module and these setup instructions. 2: Get the page URI and PublishTarget URI. 3: Run a script like this. This will get you a CoreService client (this is the part which ...


5

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


5

I think Dominic is right that the code should check if $client is null before calling the Close method. I'll update it in a second. Most likely, you are getting some other error but the finally block throws this exception which masks the original error. In the future, feel free to add these things as issues on the Google project itself. And if you're not ...


5

I can also confirm that the Impersonate method is not available in 2011 SP1. My powershell code: $URI = "http://localhost/webservices/CoreService2011.svc?wsdl" $pass = ConvertTo-SecureString "MyPassword" -AsPlainText -Force $mycreds = New-Object System.Management.Automation.PSCredential -argumentlist "MyDomain\Administrator", $pass $wcf = New-...


5

So I delved a little further a followed what the code was doing. The devil was in the detail <tcm:DefaultPageTemplate IsInherited="true" blah blah blah /> So as I'd implemented this into an existing Blueprint for testing I'd neglected to consider that the SG 'Home' was created above the 100 Master and therefore didn't have access to the necessary ...


5

Depending on timeout error you have: If it is a CoreService timeout error: use -TimeOut option in cmdlet If it is a database query execution timeout: use commandTimeout and longCommandTimeout attributes in database connection string (they both take value in seconds, so if you want a 30 minutes timeout the value should be 1800). Unfortunately, it is not ...


5

I had to create a new object. $publishInstructionData retained the object type of PublishInstructionData even though I re-initialized it. The changes to the code include: # Create a different object altogether $unpublishIntructionData = New-Object Tridion.ContentManager.CoreService.Client.UnPublishInstructionData $unpublishIntructionData.ResolveInstruction ...


5

If you'd excuse the shameless plug, I recommend that you start using the open-source Tridion PowerShell Modules that I maintain. With the Tridion-CoreService module imported, you could just do this: Unpublish-TridionItem -Id $Id -Target $publicationTarget -Priority $priority; And similar for Publish-TridionItem. There is already a decent amount of ...


5

Yes. If you want to have a “Staging & Live” Topology Type, you want a Topology consisting of two CD Environments: one with purpose “Staging” and one with purpose “Live”. Indeed, each CD Environment needs its own DBs and set of microservices (incl. Discovery Service).


5

Avoid editing the scripts unless you really run into something that cannot be set with a parameter. You should be able to pass in parameters for everything, though. Some common parameters: --Name lets you set the short name of the service. --DisplayName lets you set the user-friendly name (visible in the Services list) --Description lets you set the ...


4

I do not know the root cause of it but to inform you that this error is not a new and does not entirely related with 2013 ONLY. I have received exactly same error couple of week back with Core Svc 2011. Scratched my head for almost a week to figure it out but in vain, tried all options suggested for this error on msdn and over the internet..... and then I ...


4

I would go for CoreService for all actions, apart from parts where you have GUI extensions. It's quite quick to write and easy to check. Running these tests will quickly show you the problem. Make sure your tests are able to run multiple times without too many preconditions (for example it generates unique names, independent on each other, few dependencies ...


Only top voted, non community-wiki answers of a minimum length are eligible