We have been using our expanded version of the Tridion PowerShell API modules for many years. Recently I was forced to update to PowerShell 7 (from PS 5) because of a migration of SharePoint to SharePoint online. that's a long story... but, we manage some information (like lists of users requesting pre-production CME access) in SharePoint online and I need our script to read from SOL and then call the core service API accordingly. Now with PowerShell 7, when I try to establish my core service connection, I get failures. Specifically, when I call the below, it has no transaction properties.
Get-TridionCoreServiceClient: The property 'transactionFlow' cannot be found on this object. Verify that the property exists and can be set.
so, inside the many layers, this is being executed:
$binding = New-Object System.ServiceModel.NetTcpBinding
$binding.transactionFlow = $true
$binding.transactionProtocol = [ServiceModel.TransactionProtocol]::OleTransactions
$binding.Security.Mode = [System.ServiceModel.SecurityMode]::Transport
$binding.Security.Transport.ClientCredentialType = "Windows"
so, there's something about nettcp binding different in PowerShell 7 my searching so far turned up this statement, which may give a clue, but not enough to help me find a solution:
It seems like you're encountering an issue with using System.ServiceModel.NetTcpBinding in PowerShell 7. This is likely due to the fact that WCF (Windows Communication Foundation) is not fully supported in .NET Core, which PowerShell 7 is built on. I have tried to change the connection to http(s) without success, but that's likely user error on my part. If anyone would have some suggestions/guidance on how to get this working, I'd greatly appreciate it.