Page 1 of 1

Habitat Plugin Server Functions

Posted: Wed Apr 29, 2020 2:22 pm
by Cubert
Available as of Build 1.0.0.39

Habitat is placing new Automate Scripting Functions into the script editor for MSPs to use as needed.

Capture.PNG
Capture.PNG (43.62 KiB) Viewed 15979 times


Here is the current list of available functions and the parameters you need/can pass to it.
  • Habitat Powershell - Linux POSH Execute (Param-1= %computerid%, Param-2= Powershell command to execute)
  • Habitat Powershell - POSH Command Execute (Param-1= %computerid%, Param-2= Saved Powershell Command Name to execute)
  • Habitat Powershell - POSH Script Execute (Param-1= %computerid%, Param-2= Saved Powershell Script Name to execute, Param-3={optional}extra parameters to pass to script)
  • Habitat Stalled Agent - Restart Failed Agents via ScreenConnect (Param-1= %computerid%)

The POSH Command and POSH Script functions do not take commands and scripts directly, you must use the Habitat Powershell tool to save the scripts and commands to Automate first then pass to the function the friendly name you gave command or script.

Re: Habitat Plugin Server Functions

Posted: Fri May 01, 2020 4:28 pm
by JvdMaat
This is awesome, and a great extension to the Habitat plugin.
Looking forward to seeing other potential functions for this.
One I'm being asked for right now is a 3rd party update push. Specifically:
We have x apps enabled at the global level. But one customer only wants us to update their Zoom client.
So we can't enabled the Habitat 3rd party update on their Client, as that would push out updates for every app.
However I am able to create a search for all agents with an older Zoom version, and create a group limited to that search.
So I just need a scripted way to invoke the 3rd party update with a parameter of the %computerid% and the app I want to update.
Said script would need to push out choco.exe (Like the Habitat App Manage Maintenance script does), as that script doesn't run without being enabled at the client level. And then do the update Command (cmd.exe!!! /c "C:\ProgramData\chocolatey\choco.exe upgrade zoom-client -fy")

Re: Habitat Plugin Server Functions

Posted: Mon May 04, 2020 12:14 pm
by Cubert
We can do that..

I can give you a "Server Plugin Function" in the Automate scripting editor that would allow you to pass %computerid% and the app friendly name and we would pull it from the database of approved apps and run through the install returning the output to the script.

Re: Habitat Plugin Server Functions

Posted: Fri Jul 03, 2020 3:24 pm
by edward.cossett
Seems that the Plugin Server Function for running the PowerShell scripts isn't working properly now. Running the script with the Plugin on the Computer Management Screen works fine. It grabs the script from the DB, decodes it, writes it to a file, and then runs it with the parameters. However, when using the Plugin Server Function, it grabs the base64 from the database, and writes that to "myPSScript.ps1" instead of the script itself.
powershell.jpg
powershell.jpg (85.5 KiB) Viewed 11853 times

Re: Habitat Plugin Server Functions

Posted: Tue Jul 07, 2020 1:33 pm
by Cubert
Hmm.. Ok Ill go look at that and see whats going on...

Re: Habitat Plugin Server Functions

Posted: Thu Feb 04, 2021 12:50 am
by tgeske
edward.cossett wrote: Fri Jul 03, 2020 3:24 pm Seems that the Plugin Server Function for running the PowerShell scripts isn't working properly now. Running the script with the Plugin on the Computer Management Screen works fine. It grabs the script from the DB, decodes it, writes it to a file, and then runs it with the parameters. However, when using the Plugin Server Function, it grabs the base64 from the database, and writes that to "myPSScript.ps1" instead of the script itself.
powershell.jpg
I'm having this same issue, I'd LOVE to get this final piece working. Any progress Cubert?

Re: Habitat Plugin Server Functions

Posted: Thu Feb 04, 2021 2:38 pm
by Cubert
This has now been repaired in Habitat 1.0.0.61 which is due out in todays updates.

You can get the download manually by logging into our subscription portal and managing your subscriptions.

Re: Habitat Plugin Server Functions

Posted: Sat Feb 06, 2021 7:25 pm
by tgeske
Hi Cubert, wow that was fast! I just tested and it's working great, major props for such a quick turn around.

Re: Habitat Plugin Server Functions

Posted: Mon Feb 08, 2021 2:13 pm
by Cubert
Honestly, I forgot about this thread.

It was an easy fix but It got lost in the quagmire of stuff I was doing in July.


Sorry it took so long but on a side note it's always good to pluck the thread if you feel we may have forgotten about you. We may have...