![]() |
VOOZH | about |
The CData Cmdlets for Adobe Experience Manager are standard PowerShell cmdlets that make it easy to accomplish data cleansing, normalization, backup, and other integration tasks by enabling real-time access to Adobe Experience Manager.
The Cmdlets are not only a PowerShell interface to Adobe Experience Manager, but also an SQL interface; this tutorial shows how to use both to retrieve Adobe Experience Manager data. We also show examples of the ADO.NET equivalent, which is possible with the CData ADO.NET Provider for Adobe Experience Manager. To access Adobe Experience Manager data from other .NET applications, like LINQPad, use the CData ADO.NET Provider for Adobe Experience Manager.
Once you have acquired the necessary connection properties, accessing Adobe Experience Manager data in PowerShell can be enabled in three steps.
The driver connects to Adobe Experience Manager (AEM) instances that expose the JCR repository over WebDAV. It supports both on-premises AEM and AEM as a Cloud Service deployments.
To establish a connection, set the following properties:
Note: Tables are dynamically generated based on the JCR repository structure. Ensure that the configured user has sufficient permissions to access the required content paths in the AEM repository.
Install the module:
Install-Module AdobeExperienceManagerCmdlets
Connect:
$adobeexperiencemanager = Connect-AdobeExperienceManager -URL "$URL" -User "$User" -Password "$Password"
Search for and retrieve data:
$name = "example" $content = Select-AdobeExperienceManager -Connection $adobeexperiencemanager -Table "Content" -Where "Name = `'$Name`'" $content
You can also use the Invoke-AdobeExperienceManager cmdlet to execute SQL commands:
$content = Invoke-AdobeExperienceManager -Connection $adobeexperiencemanager -Query 'SELECT * FROM Content WHERE Name = @Name' -Params @{'@Name'='example'}
Load the provider's assembly:
[Reflection.Assembly]::LoadFile("C:\Program Files\CData\CData ADO.NET Provider for Adobe Experience Manager\lib\System.Data.CData.AdobeExperienceManager.dll")
Connect to Adobe Experience Manager:
$conn= New-Object System.Data.CData.AdobeExperienceManager.AdobeExperienceManagerConnection("URL=https://author-p12345-e67890.adobeaemcloud.com/crx/server;User=admin;Password=admin;")
$conn.Open()
Instantiate the AdobeExperienceManagerDataAdapter, execute an SQL query, and output the results:
$sql="SELECT Id, Name from Content"
$da= New-Object System.Data.CData.AdobeExperienceManager.AdobeExperienceManagerDataAdapter($sql, $conn)
$dt= New-Object System.Data.DataTable
$da.Fill($dt)
$dt.Rows | foreach {
Write-Host $_.id $_.name
}
Download a free trial of the Adobe Experience Manager Data Provider to get started:
Download NowLearn more:
👁 Adobe Experience Manager IconRapidly create and deploy powerful .NET applications that integrate with Adobe Experience Manager.