Skip to content

Write-SqlTableData : A parameter cannot be found that matches parameter name 'TrustServerCertificate' #76

@GregLeeUpSearch

Description

@GregLeeUpSearch

Import-module sqlserver -MinimumVersion 22.2.0

$ConfigInfo = Import-CSV 'C:\ConfigStuffToImportOnSQLServer.txt'

Write-SqlTableData -ServerInstance myinstance -DatabaseName 'master' -SchemaName 'dbo' -TableName 'GoodStuff' -Force -ConnectionTimeout 0 -Timeout 0 -InputData $ConfigInfo -TrustServerCertificate

This command mostly works but out of 200 SQL Servers it fails on 10 of them:

Write-SqlTableData : A parameter cannot be found that matches parameter name 'TrustServerCertificate'.

Additionally Invoke-SqlCmd runs fine against the same instances that fail the above command while using TrustServerCertificate.

The Bug (or I think it is one) is with the version 22.2.0 sqlserver module and Write-SqlTableData.

Thanks,
Greg

Metadata

Metadata

Assignees

Labels

by designUser error, intended behavior, etc...

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions