The BitTitan MSPComplete platform provides an automation framework that allows you to automate Runbook tasks using PowerShell scripts. The ability to develop, test, and debug automation scripts is enabled using the BitTitan SDK, which you can download and install locally. (See below for instructions on installing the SDK.)
The automation framework includes a BitTitan PowerShell module, which provides a set of PowerShell cmdlets that you can use to access entities in the MSPComplete platform, as well as in MigrationWiz and other BitTitan offerings. Having programmatic access to the platform allows you to complete a large number of business tasks and migration operations using automation.
Runbooks can contain both automated and manual tasks. Manual tasks provide prescriptive guidance that an agent can read and follow to manually complete a task. Automated tasks, on the other hand, execute PowerShell scripts that run tasks programmatically.
You can configure your automated tasks to start automatically (for example, upon completion of a previous task), or you can have an agent launch the automated task by clicking a button. Some tasks are “input tasks,” which ask the user to provide an input or make a selection before the task can run.
The following illustration shows an abstracted view of the MSPComplete Runbook task hierarchy, showing how a Runbook may contain a mix of both manual and automated tasks, and how you can incorporate user inputs into the task sequence.
You can even have a hybrid task, which permits both automated and manual execution. The use case for a hybrid is having a task that under some circumstances has the information it needs to run automatically, while in other circumstances may require manual intervention. This is useful if, for example, you can’t be certain at design time whether logon credentials are available programmatically at runtime.
Installing the BitTitan SDK
Installing the BitTitan PowerShell module locally allows you test and debug PowerShell scripts for automating MSPComplete services.
Begin by downloading and installing the BitTitan SDK, which requires that you first run the BitTitan PowerShell setup file. For more information about installing the SDK, see How do I install the BitTitan PowerShell SDK?
Important: If you have a previous version of the BitTitan PowerShell module installed, you must first uninstall it before installing the latest version.
Once you have downloaded the SDK, you have the PowerShell module (BitTitanPowerShell.dll), along with its dependencies. You must then import the module by launching PowerShell and executing the following command:
Import-Module 'C:\Program Files (x86)\BitTitan\BitTitan PowerShell
The module contains two sets of cmdlets – BitTitan cmdlets and MigrationWiz cmdlets. The two sets are differentiated by their prefixes, “BT” or “MW”, respectively, as shown in this example:
Get-BT_Ticket -Credentials $credentials -ServiceType BitTitan Get-MW_Ticket -Credentials $credentials
MigrationWiz (MW) cmdlets operate against MigrationWiz entities, such as Mailbox and MailboxConnector. BitTitan (BT) cmdlets operate against MSPComplete entities, as well entities associated with DeploymentPro and other BitTitan products. BitTitan entities include objects such as a Customer, TaskInstance, and OfferingMetadata.
MSPComplete and the Runbook automation model use special terms for components and actors, as defined here:
- Runbook: A Runbook is a sequence of executable tasks that are packaged as a template to support the execution of an end-to-end operation. A Runbook is used to launch a service.
- Service: A Service is the instantiated state of a Runbook. That is, once a Runbook has been launched, it becomes a Service. Put another way, a Service is an instance of a Runbook.
- Task: A Task is a single operation that, in sequence with other tasks, makes up a Runbook. Tasks can be either manual – that is, an agent performs a task manually by following prescriptive guidance – or a task can be automated using the BitTitan PowerShell module. Some tasks are input tasks, in which an agent provides an input (a string value, for example, or record selection).
- Agent: An agent is an MSPComplete actor who launches a Service, or who is assigned to perform one or more of the service instance tasks. An agent is typically an employee at an ISV or MSP firm.
- Customer: The organization (for example, a managed service provider) for whom the agent works and provides managed services.
- Workgroup: Workgroup denotes a security and subscription boundary that contains agents and teams in MSPComplete.
- Entity: An entity is an MSPComplete platform object that script authors can access and use programmatically.
- Scripting host: The scripting host is a virtual environment that MSPComplete starts up on the fly to isolate the execution of individual scripts. Each script runs in its own virtual hosting environment.
- Ticket: An authentication object that enables access to the MSPComplete platform for running automation scripts. An authentication ticket is always associated with an agent; however, the ticket can also be scoped to a customer or workgroup. For more information about authentication tickets, see the Developer Center section on Authentication.
MSPComplete Automation Overview
MSPComplete Runbooks can define complex operations by utilizing a variety of task types. The illustration below, for example, defines a sequence of tasks that complete a complex operation by using both prescriptive guidance (manual) tasks, along with fully automated tasks, and also input tasks.
The simplified Runbook depicted in the illustration defines the following workflow:
Task 1: Manual task. Presents prescriptive guidance, which the MSPComplete agent can follow to perform the task manually.
Task 2: Input task. The agent is asked to select specific customer records that the task will operate on.
Task 3: Input task. The agent is asked to provide text information (an email address, for example), or make a selection (select a user, for example) that is then saved to service context so it can be passed to a later task.
Task 4: Automated task. Invokes and runs the appropriate PowerShell automation script. Script execution may affect external systems.
Task 5: Manual task. Presents prescriptive guidance, which the MSPComplete agent can follow to perform the task manually.
Task 6: Automated task. Invokes and runs the appropriate PowerShell automation script.