![]() |
VOOZH | about |
The CData Cmdlets for HCL Domino are standard PowerShell cmdlets that make it easy to accomplish data cleansing, normalization, backup, and other integration tasks by enabling real-time access to HCL Domino.
The Cmdlets are not only a PowerShell interface to HCL Domino, but also an SQL interface; this tutorial shows how to use both to retrieve HCL Domino data. We also show examples of the ADO.NET equivalent, which is possible with the CData ADO.NET Provider for HCL Domino. To access HCL Domino data from other .NET applications, like LINQPad, use the CData ADO.NET Provider for HCL Domino.
Once you have acquired the necessary connection properties, accessing HCL Domino data in PowerShell can be enabled in three steps.
To connect to Domino data, set the following properties:
Domino supports authenticating via login credentials or an Entra ID (formerly Azure AD) OAuth application:
To authenticate with login credentials, set the following properties:
The driver uses the login credentials to automatically perform an OAuth token exchange.
This authentication method uses Entra ID (formerly Azure AD) as an IdP to obtain a JWT token. You need to create a custom OAuth application in Entra ID (formerly Azure AD) and configure it as an IdP. To do so, follow the instructions in the Help documentation. Then set the following properties:
The tenant ID is the same as the directory ID shown in the Azure Portal's Entra ID (formerly Azure AD) > Properties page.
Install the module:
Install-Module DominoCmdlets
Connect:
$domino = Connect-Domino -Server "$Server" -AuthScheme "$AuthScheme" -User "$User" -Password "$Password"
Search for and retrieve data:
$city = "Miami" $byname = Select-Domino -Connection $domino -Table "ByName" -Where "City = `'$City`'" $byname
You can also use the Invoke-Domino cmdlet to execute SQL commands:
$byname = Invoke-Domino -Connection $domino -Query 'SELECT * FROM ByName WHERE City = @City' -Params @{'@City'='Miami'}
Load the provider's assembly:
[Reflection.Assembly]::LoadFile("C:\Program Files\CData\CData ADO.NET Provider for HCL Domino\lib\System.Data.CData.Domino.dll")
Connect to HCL Domino:
$conn= New-Object System.Data.CData.Domino.DominoConnection("Server=https://domino.corp.com;AuthScheme=OAuthPassword;User=my_domino_user;Password=my_domino_password;")
$conn.Open()
Instantiate the DominoDataAdapter, execute an SQL query, and output the results:
$sql="SELECT Name, Address from ByName"
$da= New-Object System.Data.CData.Domino.DominoDataAdapter($sql, $conn)
$dt= New-Object System.Data.DataTable
$da.Fill($dt)
$dt.Rows | foreach {
Write-Host $_.name $_.address
}
Download a free trial of the HCL Domino Data Provider to get started:
Download NowLearn more:
👁 HCL Domino IconRapidly create and deploy powerful .NET applications that integrate with HCL Domino.