darkoperator / darkoperator/Posh-SSH
Terminate all sessions
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
With 2.3.0 I was able to write the terminate all my active sessions at the end of a script
#Disconnect all SFTP Sessions
Get-SFTPSession | % { Remove-SFTPSession -SessionId ($_.SessionId) } | Out-Null
I am in the process of updating the script to work with 3.0 and I can't for the life get the syntax right. Does anyone mind sharing how they would end all active sessions. I am out of ideas.
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 with the Get-SFTPSession and Remove-SFTPSession commands shown in the issue, comparing their 2.3.0 and 3.0 syntax or behavior. Confirm the supported way to iterate over active SFTP sessions and remove them all; the work is done when the script terminates every active session without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100