Bentley Transmittal Services Data Export Tool

I am having trouble getting the export tool to work:

Setup Details:


BTS Database name: BentleyTransmittalServerDB


PW SQL server name: WAV-PWSQL

PW SQL Database name: PWDATA


User: msaxon.adm – has access to the two SQL databased in question, am logged on to integration server as msaxon.adm

Folder nominated for export and containing the supplied scripts - g:\BTSExport\


Powershell run from Integration server.




g:\BTSExport\BTS_Export.ps1 -btsDbConnectionString “Server=WAV-PWTSQL;Database=BentleyTransmittalServerDB; Trusted_Connection=True;”

-pwDbConnectionString “Server=WAV-PWSQL;Database=PWDATA;UserId=msaxon.adm;Password=************;” -tryComAutofit


It runs the first half of the script and then prompts me:

PS G:\btsexport> g:\BTSExport\BTS_Export.ps1 -btsDbConnectionString “Server=WAV-PWTSQL;Database=BentleyTransmittalServerDB; Trusted_Connection=True;”
-pwDbConnectionString “Server=WAV-PWSQL;Database=PWDATA;UserId=msaxon.adm;Password=*************;” -tryComAutofit
cmdlet BTS_Export.ps1 at command pipeline position 1
Supply values for the following parameters:

If I then manually enter the -pwDbConnectionString I get

Exception calling ".ctor" with "1" argument(s): "Keyword not supported: '“server'."
At G:\BTSExport\BTS_Export.ps1:132 char:5
+ $pwDbConnection = [System.Data.SQLClient.SQLConnection]::new($pwD ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentException

You cannot call a method on a null-valued expression.
At G:\BTSExport\BTS_Export.ps1:137 char:1
+ $pwDbConnection.Open()
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

No connection to the database detected. Run command ConnectToDB first.
At G:\BTSExport\BTS_Export.ps1:51 char:13
+ Throw "No connection to the database detected. Run comman ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (No connection t...nectToDB first.:String) [], RuntimeException
+ FullyQualifiedErrorId : No connection to the database detected. Run command ConnectToDB first.