I tried to fix this error
I followed this leading me to this
Not only it didn't fix the initial problem, but I am now unable to remote query a SQL Server (I am not even sure this is the reason, but it worked before). I may have screwed something up.
Here is the Powershell command and the output (it used to work) :
PS C:\Users\lh\powershell\> invoke-command -ComputerName $ip -Credential $cred {invoke-sqlcmd -query "select @@version"}
Les données XML sérialisées sont imbriquées trop profondément. (= "Serialized xml is nested too deeply")
+ CategoryInfo : OperationStopped: (1.2.3.4:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : JobFailure
+ PSComputerName : 1.2.3.4
This error (wich I dont understand) seems to have a lot of possible causes.
Note that it works if I run it locally using RDP :
PS C:\Users\Administrateur> invoke-sqlcmd -query $sql
<rows>