darkoperator / darkoperator/Posh-SSH
Return object from Invoke-SSHcommand
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I would like to query a remote server to get a list of active policies and then be able to analyze them. I used these commands
$ssh = New-SSHSession -ComputerName $target_computer -Credential $cred -AcceptKey:$true
$gpos = $(Invoke-SSHCommand -SSHSession $ssh -Command ('powershell (Get-GPO -all)')).output
the variable $gpos is an array of strings, is it possible to get an object?
Thank you
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Invoke-SSHCommand entry point and reproduce the New-SSHSession and Invoke-SSHCommand example from the issue. Trace how the remote output is collected and determine whether the command can return usable objects rather than an array of strings; done means the shown Get-GPO query can be analyzed as objects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100