Table of Contents

Powershell connector

Powershell connector can be used to connect various types of MS Windows based systems such as MS Exchange.

Configuration

Connector attributes

argumentStyle

Powershell connector calls powershell command and passes mapped attributes to it. There are four different ways of passing an argument to powershell script and they all correspond with possible configuration values below.

testScriptPath, authenticateScriptPath, searchScriptPath, deleteScriptPath, createScriptPath, updateScriptPath, syncScriptPath

These parameters contain path to scripts (on client machine) which will be executed when corresponding operation is invoked. Make sure that the script files are accessible.

useScriptCache

If true, then scripts, once read from drive, will be kept in memory for later reuse.

userName

Username used for authentication.

disableableCertificateChecks

If true, then connector will not check certificate validity.

script ResponseType

Only CSV is supported at the moment.

authenticationScheme

Specifies type of authentication to use. Possible values are:

endpointUri

Uri contains information about protocol, port and hostname. Common URIs are

domainName

Name of AD domain. It is used for authentication purposes.

multivaluedArgumentEncodingStrategy, multivalueEncodingSeparator

This is used for encoding multivalued parameters as arguments. Possible values are:

Setting-up WinRM

Installation and Configuration for Windows Remote Management

MS Exchange

In order to use Powershell commands such as New-Mailbox, you need to add Exchange snapIn. Example powershell create script can be seen bellow.

param([string]$__UID__ = "", [string]$__NAME__ = "",[string]$SamAccountName = "", [string]$name = "", [string]$UserPrincipalName = "", [string]$__PASSWORD__)
Try{
    Add-PSSnapIn -Name Microsoft.Exchange.Management.PowerShell.SnapIn
    $secure_password = ConvertTo-SecureString -String $__PASSWORD__ -AsPlainText -Force
    New-Mailbox `
        -SamAccountName $SamAccountName `
        -Name $name `
        -UserPrincipalName $UserPrincipalName `
        -Password $secure_password `
        -Confirm:$false `
        -ErrorAction Stop | out-null -outvariable $mailbox

    Write-Host "__UID__,__NAME__"
    Write-Host "$SamAccountName,$SamAccountName"
} Catch {
    Write-Host "__ERROR__"
    Write-Host "$_.Exception.Message"
}
Another requirement is top use CredSSP authentication scheme.