Written by
  • email
  • twitter
  • linkedin
  • linkedin

Tirasa developed a new ConnID connector called ConnIDCMDBundle. This bundle is used to connect to Apache Syncope the resources that are managed by Bash or Powershell scripts. In this post I will explain how use it to execute the adamsync.ps1 in a remote contest.

Tirasa developed a new ConnID connector called ConnIDCMDBundle. This bundle is used to connect to Apache Syncope the resources that are managed by Bash or Powershell scripts.

In this post I will explain how use it to execute the adamsync.ps1 in a remote contest. Our use case is to execute a script on bridge server that called another script (real adamsync script) on a remote ADAM server.

Create a remote Powershell script on bridge server

To create a remote Powershell script we need a credential of remote server, so we have to create the encrypt file containing the password of remote administrator user.

read-host -assecurestring | convertfrom-securestring | out-file C:\securestring.txt

Now we are able to create a remote Powershell script:

$username = "TIRASA\Administrator"
              $password = cat c:\ConnectorServer\scripts\credential.txt | convertto-securestring
              $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
              Invoke-Command -ComputerName frassino -ScriptBlock { c:\script\adamsync.ps1 } -Credential $cred

This script execute a remote Powershell script adamsync.ps1 (this is only an example of script name) on ADAM server called frassino.

Configure Apache Syncope

Latest step is to configure a new Connector in Apache Syncope (CMD) to execute previuos script; it's done deal, isn't it?

0 VOTINot rated yetNot rated yet
Ti è stato utile questo articolo?
From Tirasa's Blog
The place where we share what we do, learn and discover day by day.
Go to blog >