Start powershell-console with '-mta' switch. Nevertheless, I got the error described in title when calling [TitaniumAS.Opc.Client.Bootstrap]::Initialize().
In PS-console; typing: [System.Threading.Thread]::CurrentThread.GetApartmentState() gives me 'MTA'
in PS-console; typing: $host.Runspace.ApartmentState gives me 'Unknown.'
Testing in C#(VS-Studio), with console-thread in MTA, does work.
Try to use library in Powershell(4.x)
[TitaniumAS.Opc.Client.Bootstrap]::Initialize()
.[System.Threading.Thread]::CurrentThread.GetApartmentState()
gives me 'MTA'$host.Runspace.ApartmentState
gives me 'Unknown.'Testing in C#(VS-Studio), with console-thread in MTA, does work.