ConnectWiseControlAPI icon indicating copy to clipboard operation
ConnectWiseControlAPI copied to clipboard

How can we launch the ScreenConnect Host application from the API?

Open johngagefaulkner opened this issue 4 years ago • 4 comments

Good morning!

I stumbled upon this repo a couple hours ago and, with the help of this PowerShell module, I was able to log into my instance, search for a PC via the hostname and invoke a command on it! This is far more than I'd ever achieved myself and I'm grateful this was publicly shared! However, I would like to be able to launch the ScreenConnect Host application on a targeted Session GUID allowing me to remotely access the end-user's PC. I've searched throughout the repo and I don't see that listed anywhere but I have the feeling I'm simply missing something ─ is this information already known? If so, can someone please share it? If not, is this a feature/function that this repo has the goal of implementing?

Thank you!!

johngagefaulkner avatar Apr 13 '22 06:04 johngagefaulkner

@johngagefaulkner, were you ever able to figure this out? I'm trying to do the same thing.

mavtron-andrewrusso avatar Jun 13 '24 22:06 mavtron-andrewrusso

I threw together a very basic PoC here: https://github.com/slinak/Launch-ScreenConnect-Windows-Selector-via-Powershell

I would like to tie it into what's currently in this repo but haven't started that work yet.

slinak avatar Aug 06 '24 21:08 slinak

Sorry this sat so long. There isn't a function for this yet. (Get-CWCLauncURL is a Remote Workforce function and only works for the user a machine is assigned to.) Work on a function that opens the Host client joined to a session has started, using GetAccessToken and the client's launch URL; @slinak's PoC (https://github.com/slinak/Launch-ScreenConnect-Windows-Selector-via-Powershell) is a useful reference. Keeping this open until it ships.

christaylorcodes avatar Nov 10 '26 16:11 christaylorcodes

This shipped in 0.5.0, now on the PowerShell Gallery. Enter-CWCSession opens the Host client joined to a session, like Join in the web UI; -UrlOnly returns the launch URL instead (for macOS/Linux or your own launcher). It needs a Connect-CWC -Credentials connection, and launching is Windows only. Thanks @slinak for the PoC. Please open a new issue if something doesn't work.

christaylorcodes avatar Nov 12 '26 20:11 christaylorcodes