Invoke-SQLUpdate : Argument passed in is not serializable. Parameter name: value #136
-
Hoping I can get a help with my script that after the update to version to stopped working with the below error and i'm not sure what could be the issue. Invoke-SQLUpdate : Argument passed in is not serializable. Here it is my script;
If you need any details please let me know. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 18 replies
-
@cmorillo21 can you provide the full error message and stack trace? That will help narrow down where exactly it failed and perhaps indicate why. On an aside -- you can simplify your PS by either directly setting the values in the hashtable (without using intermediate variables) or by creating a hashtable variable and passing that in. |
Beta Was this translation helpful? Give feedback.
-
@cmorillo21 -- the message is indicating an invalid cast exception -- what is the exact line of Powershell that is throwing this error? (i.e. line 119 of your auditlogs.ps1. Based upon the message, it indicates that you are passing a |
Beta Was this translation helpful? Give feedback.
-
I've created an Issue for this - but it may not be what either of us think. Once I get the problem, then any invocation of |
Beta Was this translation helpful? Give feedback.
@cmorillo21 Two things. (1) my first fix, introduced another problem that has now been fixed, will release shortly
(2) The real problem, when you use
ConvertTo-Json
you are actually getting aPSObject
back. However, when you inspect the type, its revealing itself as astring
.