I need to save variable value(s) to my ftp server directly from memory, without creating a local file. Variable can be single line or multi line.
For example:
PowerShell C:\> $cm = tasklist /S localhost /FO LIST
PowerShell C:\> $cm
............
............
............
.....list of tasks
...etc...
PowerShell C:\> $session_token = "bG9uZyBzZXNzaW9uIHRva2VubG9uZyBzZXNzaW9uIHRva2VubG9uZ"
I know how to create a file with tasklist output and upload to ftp server every 10 seconds (scheduled task), but i need to do it without file creation. Any solutions?