Habitat Plugin Server Functions

Detailed descriptions and imagery explaining each tool available inside Habitat. Feel free to post feature requests under each tools forum post if you would like to see something added or changed in the tools.
Post Reply
User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Habitat Plugin Server Functions

Post 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 15766 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.

JvdMaat
Posts: 42
Joined: Wed Feb 21, 2018 1:31 am
6

Re: Habitat Plugin Server Functions

Post 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")

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Habitat Plugin Server Functions

Post 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.

edward.cossett
Posts: 11
Joined: Tue Feb 11, 2020 4:23 pm
4

Re: Habitat Plugin Server Functions

Post 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 11640 times

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Habitat Plugin Server Functions

Post by Cubert »

Hmm.. Ok Ill go look at that and see whats going on...

tgeske
Posts: 6
Joined: Wed Oct 24, 2018 12:50 am
5

Re: Habitat Plugin Server Functions

Post 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?

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Habitat Plugin Server Functions

Post 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.

tgeske
Posts: 6
Joined: Wed Oct 24, 2018 12:50 am
5

Re: Habitat Plugin Server Functions

Post by tgeske »

Hi Cubert, wow that was fast! I just tested and it's working great, major props for such a quick turn around.

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Habitat Plugin Server Functions

Post 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...

Post Reply

Return to “Habitat Documentation Forum”