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 ....
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....
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 ...
You should only need to import the module and the cmdlet will be available:
Get-Command -Module Tridion.ContentManager.Automation
That will import the cmdlets and show you a list of them.
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'
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 ...
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.
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.
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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 ...
It works on my 2013 SP1 system.
First, I'd suggest using
to see if the module assembly is somewhere where your powershell can find it automatically. On my system,
shows the Tridion bin directory as being on the module path, and the module is listed as available.
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 ...
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
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 ...
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).
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 ...
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 ...
Eventually I realised that it wasn't the schema I wanted to attribute to the Bundle - but the schema I want to base the Bundle on (hence the Virtual Folder Reference!)
Adding the following script did just the job (note that this method is better than simply getting the ID and plugging it in for transportability of the scripts in other ...
I have found a solution to get a CoreServiceClient using a plain username and password.
$client = Get-TridionCoreServiceClient
$credentials = New-Object System.Net.NetworkCredential("username", "password")
$client.ChannelFactory.Credentials.Windows.ClientCredential = $credentials
This will get a Core Service client object, using ...
Yes, it is stored in the Windows Environment variable TRIDION_CM_ENVIRONMENT_ID.
# you can set it with PowerShell
[Environment]::SetEnvironmentVariable("TRIDION_CM_ENVIRONMENT_ID", "Development", "Machine")
Did you know there are a few more environment variables for SDL Web?
# you can inspect it with PowerShell
[cm-server]: PS C:\Users\jan\Documents> ...
Is there any way we can publish all SG’s within the publication using
Answer is yes. You can publish any sort of items using $client.Publishmethod. These items are pages, structure groups, components, keywords, bundles, templates etc... To publish them just provide their tcm ids (tcm id of structure group).
Besides this, to answer second part ...
Sounds a lot like database maintenance is lacking, for MS SQL Server you can use the following command:
This updates the statistics of the databaase which usually solves performance problems (like timeouts on queries). Now for SQL Server updating the statistics can be configured to be run automatically, but that doesn't always run at ...