Ran into a pipeline issue when using ConvertFrom-Json -Depth 20 to load a JSON file in a PowerShell@2 task in a DevOps pipeline. The -Depth parameter was throwing an error:
ConvertFrom-Json : A parameter cannot be found that matches parameter name 'Depth'
I run into this problem two years ago when I run scripts that needed the ConvertFrom-Json through PowerShell remoting on different and older version of Windows.
I discovered that the older the version, the more stability problems there were often without any warning and error.
I ended up solving this by spliting the big array into smaller ones and then running the command and saving them to disk. Then move the files and stich them in an environment that is more capable.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (1)
I run into this problem two years ago when I run scripts that needed the
ConvertFrom-Json
through PowerShell remoting on different and older version of Windows.I discovered that the older the version, the more stability problems there were often without any warning and error.
I ended up solving this by spliting the big array into smaller ones and then running the command and saving them to disk. Then move the files and stich them in an environment that is more capable.