March 23, 2018

caching Sync , clear.

December 20, 2017

Tutorial for Tridion Powershell commands

In my last blog post, i demonstrated the setup of Powershell for beginners. Now i will discuss more commands of Tridion Powershell.

List of commands: following Power shell command will return all the commands available in Tridion Powershell module.

PS C:\Windows\system32> Get-Command -Module Tridion-CoreService

  • Clear-TridionCoreServiceSettings
  • Close-TridionCoreServiceClient  
  • Convert-TridionApplicationData  
  • Get-TridionUser - there is also Get-TridionUsers which is not listed by get-command
  • Disable-TridionUser             
  • Enable-TridionUser              
  • Get-TridionApplicationData      
  • Get-TridionCoreServiceClient    
  • Get-TridionCoreServiceSettings  
  • Get-TridionGroup                
  • Get-TridionGroups               
  • Get-TridionItem                 
  • Get-TridionPublications         
  • Get-TridionPublicationTarget    
  • Get-TridionPublicationTargets   
  • Get-TridionPublishTransaction                
  • New-TridionGroup                
  • New-TridionItem                 
  • New-TridionPublication          
  • New-TridionUser                 
  • Publish-TridionItem      
Lets try few of the commands to unleash power of Powershell 

Above command it will list all the publication details with lots of additional information.  You can also filter the the number of fields to show and in nice format. below example show just Title, Id and PublicationType.

User Based Operations:

To get all users those are not currently active. PS module make is very easy to fetch those details and take action if required. Firstly all the Users are fetched then filtered on rows, then on columns respectively.

PS C:\Windows\system32> Get-TridionUsers | where  {$_.IsEnabled -eq $false} | select Title, IsEnabled, Description

Title                                                                 IsEnabled Description
-----                                                                 --------- -----------
SDLDEVCMS\rkum                                                      False Raj Kumar

Enabling all the disabled users at once:

Get-TridionUsers | where  {$_.IsEnabled -eq $false} | Enable-TridionUser

otherwise if you just use Enable-TridionUser command, you have to pass one by one to enable/Disable the users

Publish Transactions Operations:
To get the status of transactions, you manipulate the results on various parameters

Following command with list out all the failed transactions in publishing queue. 

Get-TridionPublishTransaction | where {$_.State -eq "Failed"} | select Title, Id, State

List out tranactions grouped by State

PS C:\Windows\system32> Get-TridionPublishTransaction | Group-object State

December 19, 2017

Load balancing DXA and CD servers in Web 8

With new micro-services architecture its very efficient to distribution of workloads of different servers. Dxa servers aka Presentation servers can be load balanced separately.

Features of above architecture:
  • Works best in fail-over scenarios. if any service is down other available can take the load
  • Presentation machines can be added or removed on the go without worrying about setting up the CD servers.
  • Its cost efficient scenario.

I tested above above on Microsoft Azure, presentation servers were load balanced on Application gateway.
and CD servers were load balanced using Azure Load balanced.

How does it work?

  • DXA web.config is configured with IP address of Load-balancer for Discovery service.  
  • Required capabilities listed in Discovery service has URLs of Load balancer. 
  • Discovery DB is shared among all the discovery servers.
  • Load Balancer is aware of available nodes of services.
when request comes to Application gateway, AG get it processed from one of the available DXA server. if Dxa app is already loaded and request pages is already processed and cached it can be processed completly on DXA machine itself.

otherwise Discovery Service URL is hit which goes to internal load balancer. Load balancer get this executed from one of CD server. AS discovery had configured address of Load-balancer for Content Service, request once again go to LB. it then redirects it to available Content service node. so a request is completed.

With use of Akamai and other caching strategies e.g page caching or donut caching and other tridion caching techniques CD servers might get reduced load after first hit and boot time. DXA servers are easy to Auto-scale.

December 12, 2017

Introduction to Tridion Powershell

What is PowerShell:
Windows PowerShell is a Windows command-line shell designed especially for system administrators. Windows PowerShell includes an interactive prompt and a scripting environment that can be used independently or in combination.
Windows PowerShell is built on top of the .NET Framework common language runtime (CLR) and the .NET Framework, and accepts and returns .NET Framework objects. Its also extensible.

Introduction to Tridion Powershell:

Peter Kjaer has developed Tridion Powershell Module  which contains cmdlets that allow you to talk to the Tridion Content Manager using the Core Service. This is very powerful and fast way to access Tridion system without opening CME. It Currently supported Tridion versions: 2011 SP1, 2013 GA, 2013 SP1 and Web 8.

Setting up Tridion Powershell:

Open Powershell windows as administrator. 
iwr "" | iex

Tridion Powershell module will be installed with above success message.

Verify Settings:
Run a command to test the environment. if there are issues in settings you may can following error

Get-TridionCoreServiceSettings will give you current settings its using. 
but ensure these settings are as per your environment

In my case, Coreservice was running at another port, so commands were failing. so you might have to update the setting as per need. 

Update Settings:

PS C:\Windows\system32> help set-TridionCoreServiceSettings


    Changes the settings used to connect to the Core Service.
    Set-TridionCoreServiceSettings [[-HostName] <String>] [[-Version] <String>] [[-Credential] <PSCredential>]
    [[-ConnectionType] <String>] [[-ConnectionSendTimeout] <String>] [-Persist] [<CommonParameters>]

Following command changes the hostName on my environment. You can update as per your enviornnment.

Set-TridionCoreServiceSettings -HostName localhost:91

after the setting are done, retry following command

Get-TridionPublications to get list of publications in the system.