{"action":"created","issue":{"url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/100","repository_url":"https://api.github.com/repos/darkoperator/Posh-SSH","labels_url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/100/comments","events_url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/100/events","html_url":"https://github.com/darkoperator/Posh-SSH/issues/100","id":163887963,"number":100,"title":"How to read property from last invoked command?","user":{"login":"munchie45","id":20303525,"avatar_url":"https://avatars.githubusercontent.com/u/20303525?v=3","gravatar_id":"","url":"https://api.github.com/users/munchie45","html_url":"https://github.com/munchie45","followers_url":"https://api.github.com/users/munchie45/followers","following_url":"https://api.github.com/users/munchie45/following{/other_user}","gists_url":"https://api.github.com/users/munchie45/gists{/gist_id}","starred_url":"https://api.github.com/users/munchie45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munchie45/subscriptions","organizations_url":"https://api.github.com/users/munchie45/orgs","repos_url":"https://api.github.com/users/munchie45/repos","events_url":"https://api.github.com/users/munchie45/events{/privacy}","received_events_url":"https://api.github.com/users/munchie45/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-05T16:08:55Z","updated_at":"2016-07-06T09:57:22Z","closed_at":null,"body":"Hi,\r\n\r\nI'm automating some hardware config backup job and command: **Invoke-SSHCommand -SessionId $sessionId -Command \"backup\"** gives me output:\r\n\r\n_Output     : {File written to the location, \"/backup/backup-2016-07-05.cfg\"., Configuration saved.}\r\nExitStatus : 0\r\nError      : \r\nHost       : 192.168.100.132\r\nDuration   : 00:00:03.3760740_\r\n\r\nif i could access output property i could use:\r\n\r\n**$output -split '\"' -match '\\/backup/([\\s\\S]*)')**\r\n\r\nalready tried:\r\n**$output = Invoke-SSHCommand ... | Select -ExpandProperty Output\r\n$output = $(Invoke-SSHCommand ...).Output**\r\n\r\nand pass it to Get-SCPFile in order to download the backup file.\r\nI dont want to use streams because thats how im currently backing up with SshShell module "},"comment":{"url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/comments/230729509","html_url":"https://github.com/darkoperator/Posh-SSH/issues/100#issuecomment-230729509","issue_url":"https://api.github.com/repos/darkoperator/Posh-SSH/issues/100","id":230729509,"user":{"login":"darkoperator","id":521246,"avatar_url":"https://avatars.githubusercontent.com/u/521246?v=3","gravatar_id":"","url":"https://api.github.com/users/darkoperator","html_url":"https://github.com/darkoperator","followers_url":"https://api.github.com/users/darkoperator/followers","following_url":"https://api.github.com/users/darkoperator/following{/other_user}","gists_url":"https://api.github.com/users/darkoperator/gists{/gist_id}","starred_url":"https://api.github.com/users/darkoperator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkoperator/subscriptions","organizations_url":"https://api.github.com/users/darkoperator/orgs","repos_url":"https://api.github.com/users/darkoperator/repos","events_url":"https://api.github.com/users/darkoperator/events{/privacy}","received_events_url":"https://api.github.com/users/darkoperator/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T09:57:22Z","updated_at":"2016-07-06T09:57:22Z","body":"Sorry just woke up and miss read, no there is no way to control the underline switches the library sends. What gear is this?\n\nSent from my iPhone\n\n> On Jul 6, 2016, at 5:45 AM, munchie45 <notifications@github.com> wrote:\n> \n> ahhh, i was wondering why there are commas... thanks! anyway, i have another issue. when i try to download the file it says:\n> \n> PS C:\\cmd> Get-SCPFile -ComputerName $IP -Credential $(Get-Credential) -RemoteFile /backup/backup.txt -LocalFile c:\\cmd\\test.txt -Verbose -Debug\n> cmdlet Get-Credential at command pipeline position 1\n> Supply values for the following parameters:\n> VERBOSE: Using SSH Username and Password authentication for connection.\n> VERBOSE: Fingerprint matched trusted fingerprint for host 192.168.100.132\n> VERBOSE: Connection successful\n> VERBOSE: Downloading backup.txt\n> Get-SCPFile : scp: \"/backup/backup.txt\": No such file or directory.\n> At line:1 char:1\n> \n> When i use pscp it downloads the file with no issues. From the logs on the remote hardware i can see a difference in issued commands:\n> \n> pscp:\n> executed batch command: 'scp -f /backup/backup.cfg'\n> \n> Get-SCPFile:\n> executed batch command: 'scp -pf \"/backup/backup.cfg\"'\n> \n> is there any way to control what switches are used in Get-SCPFile and remove quotations marks from the filename?\n> \n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n> \n"}}
{"actor":{"display_login":"darkoperator"}}