Answer the question
In order to leave comments, you need to log in
Using powershell how to upload file to server?
The problem is that I can’t find how to properly upload a JSON file to a remote server, according to the ConverTo-Json and ConverFrom-Json documentation, as I understood write and read for Json file in comandRow (on the command line). Can someone tell me the correct or simple method how to implement a simple upload of a json file to a remote server, thanks in advance!
Here are attempts, perhaps in the wrong direction, I write the code:
Answer the question
In order to leave comments, you need to log in
In your first example, you simply create a PSObject object from a JSON file, but do not load it anywhere.
The second one most likely does not work because it does not have write access to the specified path "(There is one slash)json_file.json"
In general, there is such a Posh-SSH module ... Facilitates the implementation of exercises with SSH, SCP, (S)FTP ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question