Deploying Agent Smith with ImmyBot

This was shared during a recent open mic: Feb 2nd, 2024 - Inside the Eye of the Brainstrom.

Shout out to Kewp Member Logan for submitting this guide!

Immybot is an extremely powerful DSC platform that utilizes integrated agents to spawn an 'ephemeral' agent. This agent is then capable of running scripts such as the ones provided in this directory while being fueled by Immy's amazing PS Functions.

One important thing to know if you've never used Immy, is that Invoke-ImmyCommand is essentially the same as PSRemote's Invoke-Command.

Setup

High-level overview

  1. Create the software object in Immy

    • Software objects are what Immy uses to interpret an application that should be deployed.

    • The scripts here should be entered in the corresponding blank script fields

    • The PowerShell scripts handle:

      • Detection of the agent

      • Installation of the agent

      • Uninstallation of the agent

      • Dynamically acquiring the latest version of the agent

      • Comparing the existing version vs. the latest version and applying the desired state.

  2. Create and assign a configuration task to the software object.

    • Configuration tasks can run post-install/update/detection scripts typically intended for ensuring running compliance with your configured settings.

    • Configuration tasks also store parameters for the software object. This allows for using variables in every other script for the software object, even without scripts being set on the task.

  3. Create and define a Deployment

    • Deployments are where the magic happens- this is where you tell Immy where and if you want your software present.

    • Select Agent Smith for the software in question, fill in the parameters

  4. Using Agent Smith for Immy script execution (coming soonℒ️)

Software

  1. After selecting new software, you should be on the actual setup page now. Enter a name, logo, and description for your agent

  2. Begin loading the PowerShell scripts into each corresponding field.

    • The names of the scripts I provide in this directory indicate where they should be used on this page.

    • The image below should also serve as a handy guide:

Configuration Task

You will also need to set up a Configuration Task in order to pass parameters into the script. The way Immy handles this is by loading said parameters into a Configuration Task, then filling in your parameters:

Once parameters are all set, set Scripts to Use separate scripts and disable the Test, Get, and Set scripts, as we do not need to do any post-install configuration.

Deployment

Once the rest is completed, all you need to do is deploy!

Fill in all parameters, select your targets, and you're done! πŸŽ‰ If you have any troubles, the people in the #v-immybot channel in the MSPGeek discord has a ton of brilliant people willing to help :)

Last updated