out of 200 SQL Servers it fails on 10 of them:
Have all 200 SQL Server the same version or do the 10 have a different one?
Sorry, you provided so less informations, it's difficult to guess.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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'.
Additional SQL Server features and topics not covered by specific categories
Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
out of 200 SQL Servers it fails on 10 of them:
Have all 200 SQL Server the same version or do the 10 have a different one?
Sorry, you provided so less informations, it's difficult to guess.
I ended up just installing SqlServer module again with using the force and it solved the problem. I was using an older version of SqlServer and you need to use v22.
Find versions in Powershell (as admin): Get-Module SqlServer -ListAvailable
Install latest: Install-Module -Name SqlServer -Force