Jump to content
bigdessert

RMM+ ScreenConnect Plugin with Labtech Integration

Recommended Posts

50 minutes ago, bigdessert said:

Everything looks right. I would take your command and copy into a notepad and make sure you aren't getting some funky spaces or something. If your access key is wrong it will say "wrong key" if the session ID isn't right it will say "session not found" so something else is going on here and I have a hunch there is some hidden spacing at the end or something.

There is certainly something weird going on, that session ID exists in screenconnect, I can see it, but its not returning any properties.

image.png.1c4a33ed47826df5f2cd28b51382f964.png

I just noticed now that I walked away and came back that this system is missing any information under 'guest last connected' if that's what your using to do the calc?

image.png.69d0dbc36e45e85fcac05d3fb79e26a7.png

 

Share this post


Link to post
Share on other sites
5 minutes ago, bigdessert said:

idle time 158 days? you got something wrong with this agent or your DB.

Its an old DB on our test environment so I'll take the bet ;)

Share this post


Link to post
Share on other sites

This seams to be the only forum where this actually exists, so suppose I will ask it here;

I am looking to use this plugin outside of Automate, as in I have a script which does some stuff, but this is all based on the hostname of the computer. There is no way for this script to get access to GUID. As this ScreenConnect install isnt the one thats part of Automate (we have 3 in total)

Is it possible to add a hostname lookup function to the API that returns the GUID to be used in the rest of the scripts?

Share this post


Link to post
Share on other sites

Great idea! I will add two new functions. One based on host name the other based on session name(because they can be different) 

  • Like 1

Share this post


Link to post
Share on other sites
On 10/23/2018 at 4:35 AM, itinfserv said:

This seams to be the only forum where this actually exists, so suppose I will ask it here;

I am looking to use this plugin outside of Automate, as in I have a script which does some stuff, but this is all based on the hostname of the computer. There is no way for this script to get access to GUID. As this ScreenConnect install isnt the one thats part of Automate (we have 3 in total)

Is it possible to add a hostname lookup function to the API that returns the GUID to be used in the rest of the scripts?

I added two new functions in version 1.0.12. This should be approved this week. Thanks for the idea!

Share this post


Link to post
Share on other sites

Thanks a million, cant wait for this :) going to save me a LOT of hassles.

Outside of working from Automate, everything can do with working from session and host names, so if you ever feel like extending that it is definitely useful from a pure ScreenConnect side of things.

Like said, our Automate ScreenConnect is easy, since that has the GUID's available. But the other 2 are not so easy. Your plugin makes it easy again :)

Share this post


Link to post
Share on other sites

Has anyone tried this in combination with the Labtech Powershell Module ( http://labtechconsulting.com/labtech-agent-powershell-module/ ) ?

I can't seem to get the SCCommand to work.  Keeps saying "'iex' is not recognized as an internal or external command".

I can get the commands to work directly in the Screenconnect Command box

#!ps
(new-object Net.WebClient).DownloadString('http://bit.ly/ltposh') | iex
Reinstall-LTService

 

 

thanks,

 

 

Share this post


Link to post
Share on other sites
58 minutes ago, bigdessert said:

Please post full command omit your key though. 

powershell -command "& "Invoke-RestMethod -Method Post -Uri '@SCExecCommandURL@' -Body '[\"@scaccesskey@\", \"@scguid@\", \"powershell -Command (new-object Net.WebClient).DownloadString(''https://goo.gl/tb38WQ'') | iex;Reinstall-LTService\", \"10\" ]' -ContentType 'application/json'";

 

 

thanks

Share this post


Link to post
Share on other sites
1 hour ago, bigdessert said:

Pretty sure you need to escape the double quotes around the url https://goo.gl/tb38WQ

the problem is definitely the quotes, but I can't seem to get them right. 

this works perfectly in Screenconnect command box

powershell -command "iex(new-object Net.WebClient).DownloadString('http://bit.ly/ltposh');Reinstall-LTService" 

but when I put it in @SCCommand@ to run with the "Exe Batch command", all quotes disapear and I get the error " Missing ')' in method call. "

 

image.png.834226330125cbc988624f0f340d69f2.png

Share this post


Link to post
Share on other sites
powershell -command "& "Invoke-RestMethod -Method Post -Uri '@SCExecCommandURL@' -Body '[\"@scaccesskey@\", \"@scguid@\", \"powershell -Command (new-object Net.WebClient).DownloadString(\"https://goo.gl/tb38WQ\") | iex;Reinstall-LTService\", \"10\" ]' -ContentType 'application/json'";

How about this?

Share this post


Link to post
Share on other sites
3 hours ago, bigdessert said:

powershell -command "& "Invoke-RestMethod -Method Post -Uri '@SCExecCommandURL@' -Body '[\"@scaccesskey@\", \"@scguid@\", \"powershell -Command (new-object Net.WebClient).DownloadString(\"https://goo.gl/tb38WQ\") | iex;Reinstall-LTService\", \"10\" ]' -ContentType 'application/json'";

How about this?

no luck

I've found that Piping in powershell doesn't work in the command so did it like this.

powershell -Command iex(new-object Net.WebClient).DownloadString(\"http://bit.ly/ltposh\");Reinstall-LTService

 

Powershell -command "& "Invoke-RestMethod -Method Post -Uri '@SCExecCommandURL@' -Body '[\"@scaccesskey@\", \"@scguid@\", \"powershell -Command iex(new-object Net.WebClient).DownloadString(\"http://bit.ly/ltposh\");Reinstall-LTService\", \"10\" ]' -ContentType 'application/json'";

 

but I get the same error.  Missing ')' in method call.

 

 

Share this post


Link to post
Share on other sites

Through some trial an error this works for me.

 

Powershel -command "& "Invoke-RestMethod -Method Post -Uri '@SCExecCommandURL@' -Body '[\"@scaccesskey@\", \"@scguid@\", \"powershell -Command iex(new-object Net.WebClient).DownloadString(''http://bit.ly/ltposh'');Reinstall-LTService\", \"10\" ]' -ContentType 'application/json'";"

 

Share this post


Link to post
Share on other sites
10 hours ago, bigdessert said:

Through some trial an error this works for me.

 


Powershel -command "& "Invoke-RestMethod -Method Post -Uri '@SCExecCommandURL@' -Body '[\"@scaccesskey@\", \"@scguid@\", \"powershell -Command iex(new-object Net.WebClient).DownloadString(''http://bit.ly/ltposh'');Reinstall-LTService\", \"10\" ]' -ContentType 'application/json'";"

 

YES, this works perfectly.  Thanks a lot for the fast responses and thanks for the great plugin.

Share this post


Link to post
Share on other sites

Is the extension supposed to auto update?  I'm on 1.0.7 but I see 1.0.12 is out.  When I check on "check for updates" in Control, it shows as up to date.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×