MSPComplete Tasks

This article provides information on how to use the out-of-the-box task library components within MSPComplete.

Tasks


Combine CSVs

Combines two CSVs into a single CSV.

  • The resulting CSV contains all the columns that were present in either of the two original CSVs.
  • The resulting CSV will contain the columns in sorted order.

Inputs

  • FirstCsv

    A CSV string; required.

    This is the first CSV string which will be combined by this task.

    Required columns:

    • Ring; required.

    • The first CSV string which will be combined by this task.

  • SecondCsv

    A CSV string; required.

    This is the second CSV string that will be combined by this task.

    Required columns:

    • Ring; required.

    • The second CSV string which will be combined by this task.

Outputs

  • CombinedCsv

    The combined CSV contains the columns and rows that were present in either of the two original CSVs.

Version: 1.0.1

Date: 20 March 2019

Back to top


Compress Files

Compresses up to five files into a zip archive with the option to password-protect the archive.

If the file is in text format (i.e. extension with txt, csv, log, bat, dat), no encoding of the file is required.

Otherwise, if the file is not in text format, the file bytes are to be encoded in Base64.

Inputs

  • File1Name

    A single string, in the format of FILENAME.EXTENSION; required.

    Examples: report.pdf

  • File1Contents

    A single string; required.

    If the file is in text format, this should be the text contents of the file.

    If the file is in a non-text format, the contents should be the Base64 encoded byte contents of the file, using [Convert]::ToBase64String((Get-Content -Encoding Byte -Path FILE_PATH)).

  • File(X)Name - Where (X) is 2, 3, 4 or 5

    Same as File1Name; optional

  • File(x)Contents - Where (X) is 2, 3, 4 or 5

    Same as File1Contents; optional

  • Password

    A single string; optional.

    If provided, this password protects the zip archive.

Outputs

  • ZipContents

    The Base64 encoded byte content of the zip file containing all the files to compress.

    To convert back to a zip file, use: [Convert]::FromBase64String($ZipContents) | Set-Content -Encoding Byte -Path FILE_PATH

Version: 1.1.2

Date: 18 March 2019

Back to top


Convert String To Boolean

Converts an input string variable to an output boolean variable

Accepted string values that equate to boolean true are (case insensitive):

"true"
"yes"
"agree"
"1"

Accepted string values that equate to boolean false are (case insensitive):

"false"
"no"
"disagree"
"0"
If the string provided contains any value other than those in the true/false list, the output boolean variable is null.

Inputs

  • StringVariable

    A single string; required.

    This is the input string variable to convert to a boolean variable.

Outputs

  • BooleanVariable

    This is the converted input string variable.

Version: 1.1.1

Date: 18 March 2019

Back to top


Create Customer V2

Creates an MSPComplete customer with the primary domain, company name, and country name.

Inputs

  • PrimaryDomain

    A single string; required.

    This is the primary domain of the new customer.

  • CompanyName

    A single string; required.

    This is the company name of the new customer.

  • CountryName

    A single string; optional.

    This is the name of the country of the new customer.

  • CityName

    A single string; optional.

    This is the name of the city of the new customer.

Outputs

  • None.

Version: 2.0.0

Date: 18 March 2019

Back to top


Create Users

Creates MSPComplete customer end users.

The end users will be created in the customer in the current MSPComplete context.

Inputs

Usage option 1: Create an end user in an MSPComplete customer

  • FirstName

    A single string; required.

    This is the first name of the end user to be created.

  • LastName

    A single string; required.

    This is the last name of the end user to be created.

  • PrimaryEmailAddress

    A single string; required.

    This is the primary email address of the end user to be created.

  • UserPrincipalName

    A single string; optional.

    This is the user principal name of the end user to be created.

    It does not have to be the same value as the PrimaryEmailAddress.

Usage option 2: Create end users in MSPComplete customers

  • EndUsersCsv

    A CSV string containing information about the users to be created.

    Required columns:

    • FirstName

      A single string.

      This is the first name of the end user to be created.

    • LastName

      A single string.

      This is the last name of the end user to be created.

    • PrimaryEmailAddress

      A single string.

      This is the primary email address of the end user to be created.

    Optional columns:

    • UserPrincipalName

      A single string; optional.

      This is the user principal name of the end user to be created.

      It does not have to be the same value as the PrimaryEmailAddress.

Outputs

  • MSPCompleteCreateCustomerEndUsersCsv

    A CSV string containing information about the end users which were created, as well as an additional column 'EndUserCreated' to indicate if the end-user was successfully created.

  • MSPCompleteCreateCustomerEndUsersErrorMessages

    A string containing all of the error messages that were generated over the course of this task.

Version: 2.1.1

Date: 18 March 2019

Back to top


Create Group

Creates an MSPComplete group with a name and email.

Inputs

  • MSPCompleteGroupName

    A single string; required.

    This is the name of the new group.

  • MSPCompleteGroupEmail

    A single string; required.

    This is the email address of the new group.

Outputs

  • MSPCompleteGroup

    The newly created MSPComplete group object.

Version: 1.0.1

Date: 18 March 2019

Back to top


Create Office 365 Endpoint V2

Creates an Office 365 endpoint in MSPComplete with admin credentials in the current MSPComplete context.

Inputs

  • Office365EndpointName

    A single string; required.

    This is the name of the new endpoint.

  • Office365AdminUsername

    A single string; required.

    This is the username to be stored in the new endpoint.

  • Office365AdminPassword

    A single string; required.

    This is the password to be stored in the new endpoint.

Outputs

  • Office365Endpoint

    The created MSPComplete endpoint object.

Version: 2.0.0

Date: 18 March 2019

Back to top


Decompress Files

Decompresses a zip archive and returns up to five of the files contained in the archive.

Specific file paths may be specified within the archive to select the files to be returned.

If the file paths are not specified, the first five files in the archive will be returned, when sorted by file name.

Inputs

Usage option 1: Decompress a zip archive and return up to the first five files in the archive, sorted by file name

  • ZipContents

    A single string; required.

    This is the Base64 encoded byte contents of the zip archive. To generate this, use [Convert]::ToBase64String((Get-Content -Encoding Byte -Path ZIP_FILE_PATH)).

  • Password

    A single string; optional.

    This specifies the password used to decompress the zip archive if it is password protected.

Usage option 2: Decompress a zip archive and return up to the five files specified by their relative file paths

  • ZipContents

    A single string; required.

    This is the Base64 encoded byte contents of the zip archive. To generate this, use: [Convert]::ToBase64String((Get-Content -Encoding Byte -Path ZIP_FILE_PATH)).

  • Password

    A single string; optional.

    This specifies the password used to decompress the zip archive if it is password protected.

  • FilePathsToReturn

    Up to five strings separated by a new line; required.

    This specifies up to five files within the zip archive which will be returned by this task.

    The file paths are relative to the root directory of the archive.

Outputs

  • MSPCompleteDecompressFilesFile(X)Name - Where (X) is 1, 2, 3, 4 or 5

    The name of each of the files returned by this task.

  • MSPCompleteDecompressFilesFile(X)Contents - Where (X) is 1, 2, 3, 4 or 5

    If the returned file is in text format, this is the text contents of the file.

    Otherwise, this is the Base64 encoded byte contents of the file.

    To convert the byte contents back to a file, use: [Convert]::FromBase64String($MSPCompleteDecompressFilesFile(X)Contents) | Set-Content -Encoding Byte -Path OUTPUT_FILE_PATH

Version: 1.0.2

Date: 18 March 2019

Back to top


Delete User

Deletes a MSPComplete customer end user.

Inputs

  • User

    A single MSPComplete end-user object; required.

    This is the user which will be deleted.

Outputs:

  • None.

Version: 1.0.1

Date: 18 March 2019

Back to top


Delete Group

Deletes a MSPComplete customer group.

Inputs:

  • MSPCompleteGroup

    A single MSPComplete group object; required.

    This is the group that will be deleted.

Outputs:

  • None.

Version: 1.1.1

Date: 18 March 2019

Back to top


Filter CSV

Filters a CSV string to retain rows where the specified column matches one of the values specified

Inputs

  • Csv

    The CSV to filter.

    Required columns:

    •  

      to filter.

  • ColumnName

    Single string value; required.

    This is the column name used to filter the CSV rows.

  • ColumnValues

    One or more string values separated by a new line; required.

    These are the values that will be compared against the values in the CSV.

    If the value in the CSV matches any of these values, the row will be retained.

Outputs

  • ProcessedCsv

    The CSV with only the rows where the specified column matches one of the values specified.

Version: 1.1.1

Date: 20 March 2019

Back to top


Generate a Random Password

Generates a random password with the given requirements.

By default, the password will be 8 characters long with a random number of lowercase, uppercase, digits and special characters.

Inputs

  • NumberOfCharactersInPassword

    String; optional

    The length of the password, with a minimum length of 1

    Defaulted to 8 characters in the password.

  • MinimumNumberOfLowercaseCharacters

    String; optional

    The minimum number of lowercase characters in the password

    Set to -1 to indicate no lowercase characters should be present in the password

    Defaulted to 0, i.e. a random number of lowercase characters

  • MinimumNumberOfUppercaseCharacters

    String; optional

    The minimum number of uppercase characters in the password

    Set to -1 to indicate no uppercase characters should be present in the password

    Defaulted to 0, i.e. a random number of uppercase characters

  • MinimumNumberOfDigits

    String; optional

    The minimum number of numerical digits in the password

    Set to -1 to indicate no numerical digits should be present in the password

    Defaulted to 0, i.e. a random number of digits

  • MinimumNumberOfSpecialCharacters

    String; optional

    The minimum number of special characters in the password

    Set to -1 to indicate no special characters should be present in the password

    Defaulted to 0, i.e. a random number of special characters

  • SpecialCharactersToUse

    String; optional

    The special character set to use instead of the default special character set

Outputs

  • NewPassword

    The randomly generated password

Version: 1.3.1

Date: 18 March 2019

Back to top


Get Group Using Email Address

Retrieves an MSPComplete Group using an Email Address as a lookup.

Inputs

  • GroupEmailAddress

    A single string; required.

    This is the email address of the MSPComplete group which will be retrieved.

Outputs:

  • CustomerGroup

    This is the MSPComplete group object which is retrieved using the email address.

Version: 1.0.1

Date: 18 March 2019

Back to top


Get User Using Email Address

Retrieves an MSPComplete User using an Email Address as lookup.

Inputs

  • UserEmailAddress

    A single string; required.

    This is the email used to search for the user.

Outputs

  • User

    This is the MSPComplete end-user object retrieved using the email address.

Version: 1.0.1

Date: 18 March 2019

Back to top


Replace Text In Template

Replaces placeholders with the provided values within a text template

Inputs

  • Template

    A string; required.

    This is the template that will receive the text replacement.

  • Placeholder(X) - Where (X) is 1, 2, 3, 4, 5

    A single string; optional.

    This is required if the corresponding Value(X) is provided.

    Occurrences of this placeholder text in the template will be replaced by the provided value.

  • Value(X) - Where (X) is 1, 2, 3, 4, 5

    A single string; optional.

    This is required if the corresponding Placeholder(X) is provided.

    This value will replace occurrences of the placeholder text in the template.

Outputs

  • ProcessedTemplate

    The processed template after replacing all of the placeholder-value pairs.

Version: 1.0.1

Date: 18 March 2019

Back to top


Retrieve Customers Using Primary Domain

Retrieves MSPComplete Customers in CSV string format from a CSV specifying the customer domains

The CSV provided for the task is required to contain a 'Domain' column to specify the customer's primary domains to search.

Inputs

  • DomainsCsv

    A CSV string containing information about the customers to retrieve.

    Required columns:

    • Domain

      A single string.

      This is the domain used to retrieve the customer.

Outputs

  • MSPCompleteCustomersCsv

    A CSV string containing information about the retrieved customers:

    - Customer ID

    - Company name

    - Customer primary domain

Version: 1.0.1

Date: 18 March 2019

Back to top


Retrieve Groups

Retrieves MSPComplete groups.

The MSPComplete groups are retrieved as MSPComplete group objects.

The group objects are retrieved from the MSPComplete customer in the runbook context.

The groups retrieved can be specified by:

  • Group name
  • Extended property name and values

Inputs

Usage option 1: Retrieving groups that match one or more group names

  • GroupNames

    One or more strings separated by a new line; required.

    The MSPComplete group will be selected if it matches any of these names.

Usage option 2: Retrieving groups that have an extended property that matches one or more values

  • GroupExtendedPropertyName

    A single string; required.

    This is the name of the extended property which will be used to check against the list of values.

  • GroupExtendedPropertyValues

    One or more strings separated by a new line; required

    The MSPComplete group will be selected if its extended property with the name provided matches any of these values.

Usage option 3: Retrieving groups using a CSV

  • FiltersCsv

Outputs

  • MSPCompleteRetrievedGroups

    This contains the group objects that are retrieved by this task that match the specified filters.

  • MSPCompleteRetrieveGroupsErrorMessages

    A string containing all the error messages that were generated over the course of this task.

Version: 1.0.2

Date: 18 March 2019

Back to top


Retrieve MX Records

Retrieves MX records for the specified domain(s)

Inputs

  • Domains

    One or more strings separated by a comma; required.

    These are the domains for which the MX records will be retrieved.

  • Server

    A single string; optional.

    This specifies the server which the MX records will be retrieved from.

Outputs

  • MXRecordsCsv

    A CSV string containing the information about the MX records:

    - MX record name

    - MX record exchange

Version: 1.0.2

Date: 18 March 2019

Back to top


Retrieve User Property

Retrieves an MSPComplete user's property or extended property as an output parameter

If the name provided does not match a property, the name will be searched against the user's extended properties.

Inputs

  • User

    A single MSPComplete end-user object; required.

    This is the user where the property will be retrieved from.

  • PropertyName

    A single string; required.

    This is the name of the property which will be retrieved from the group.

Outputs

  • PropertyValue

    The value of the property retrieved from the group.

Version: 1.0.1

Date: 18 March 2019

Back to top


Select Values from the CSV

Selects one or more values from a CSV string using the provided row indices and column names.

The values being returned are formatted as raw strings after extraction from the CSV, and subsequent post-processing of the value may be required to convert it to the desired output type.

If the CSV is invalid, null strings are returned.

If the row index or column name provided is invalid, a null string is also returned.

Inputs

  • CsvString

    A string; required.

    The CSV string containing the values from which the intended values will be extracted.

  • Selection1RowIndex

    A single string; required.

    This contains the string representation of the row index from which the first value will be extracted.

    The row indices start from 0 for the first row, 1 for the second row and so on.

  • Selection1ColumnName

    A single string; required.

    This is the name of the column from which the first value will be extracted.

  • Selection(X)RowIndex - Where (X) is 2, 3, 4, 5

    Same as Selection1RowIndex; optional.

    This is required if the corresponding Selection(X)ColumnName is specified.

  • Selection(X)ColumnName

    Same as Selection1ColumnName; optional.

    This is required if the corresponding Selection(X)RowIndex is specified.

Outputs

  • MSPCompleteSelectValueFromCsvSelectedValue(X) - Where (X) is 1, 2, 3, 4 and 5

    The various string values extracted from the CSV.

  • MSPCompleteSelectValueFromCsvAllErrorMessages

    A string containing the error messages that were generated over the course of this task.

Version: 1.1.1

Date: 18 March 2019

Back to top


Transpose CSVs

Transposes CSV data for up to five CSV strings.

The CSV string header will be transposed into a "Name" column.

If there is only one data row in the CSV string, it will be transposed into a "Value" column.

If there is more than one data row in the CSV string, they will be transposed into "Value1", "Value2", "Value3" etc., columns.

Inputs

  • Csv1

    A single string; required.

  • Csv(X) - Where (X) is 2, 3, 4, 5

    Same as Csv1; optional

Outputs

  • TransposedCsv(X) - Where (X) is 1, 2, 3, 4, 5

    This is the result of transposing each of the CSV strings.

  • MSPCompleteTransposeCsvsErrorMessages

    A string containing the error messages was generated over the course of this task.

Version: 1.0.1

Date: 18 March 2019

Back to top

Was this article helpful?
0 out of 0 found this helpful