PowerShell CMDLETs
To get access to Connectivity Hub scheduling commands you open a PowerShell instance and import the Connectivity Hub module using the following command: (This applies to all of the topics below.)Import-Module BAInsight.ConnectivityEngine.PowerShell
-
Importing and Exporting Contents and Connections through PowerShell
-
How to Export Your Content and Connection Using the Export cmdlet
-
How to Import Your Content and Connection Using the Import cmdlet
How to Schedule Jobs Through PowerShell
Any job can be scheduled from PowerShell.
To schedule a job, use the following steps.
- Open a PowerShell instance and import the Connectivity Hub module to get access to scheduling commands:
Import-Module BAInsight.ConnectivityEngine.PowerShell
- Enter
New-ConnectivityEngineJobSchedule
into your PowerShell to schedule a new job.
You are prompted to provide the following parameters:- Switch parameter:
ContentTask|ConnectionTask|TargetTask
- Specify only one depending on whether you are running a job on Content, a Connection, or a Target.
- Switch parameter:
- Schedule recurrence.
- Select between
Daily
,Weekly
, orMonthly
.
- ScheduleTaskFor:
- Enter the name of your connection.
- For example:
MySqlConnection
.
- JobName:
- For example, Security Sync.
Depending on the Schedule recurrence, you are prompted to specify other parameters. - Switch parameter:
- See the following example of a Security Sync job that is scheduled to run daily at 10 AM:
Run a Job Immediately
To run a new job immediately, use the following information.
- Open a PowerShell instance and import the Connectivity Hub module to get access to scheduling commands:
Import-Module BAInsight.ConnectivityEngine.PowerShell
- To run a new job, enter the following command into your PowerShell:
Start-ConnectivityEngineJob
- You are prompted to supply values for the following parameters:
- Switch parameter: Enter one of the following commands depending on whether you are running a job on content, a connection, or a target:
ContentTask|ConnectionTask|TargetTask
- Connection Job: If you are starting a connection job like Security Sync or Datatypes Load, switch to ConnectionTask by using the following command:
Start-ConnectivityEngineJob -ConnectionTask
- Content Job: If you are starting a content job, switch to ContentTask by using the following command:
Start-ConnectivityEngineJob -ContentTask
- Target Job: If you are starting a target job, switch to TargetTask by using the following command:
Start-ConnectivityEngineJob -TargetTask
- ScheduleTaskFor: Enter the name of your connection. For example,
MySqltConnection
- JobName: For example, Security Sync
- Switch parameter: Enter one of the following commands depending on whether you are running a job on content, a connection, or a target:
- If all the parameters are correct, a message appears indicating your task has been started.
- If the parameters you entered are incorrect, an exception is thrown and you must correct your cmdlet.
Importing and Exporting Contents and Connections through PowerShell
Open a PowerShell instance and import the Connectivity Hub module to get access to scheduling commands:
Import-Module BAInsight.ConnectivityEngine.PowerShell
How to Export Your Content and Connection Using the Export cmdlet
Using the export cmdlet command, you can export your content and connection to an XML object and save it to disk.
Use the following steps to use export cmdlet to export your content and connection.
-
Select the content you want to export:
Copy$content = Export-ConnectorFrameworkContent -Title "Sharepoint Online Content"$content.ToString() >> sharepointOnlineContent.xml
- Check the XML file just generated.
- The file contains a serialized representation of your content and the associated connection.
- See the following graphic.
- Use a text editor to modify the various available properties.
How to Import Your Content and Connection Using the Import cmdlet
- In a PowerShell console, type the following command:Copy
$contentToImport = [System.Xml.Linq.XDocument]::Load("sharepointOnlineContent.xml")
Import-ConnectorFrameworkContent -TemplateToImport $contentToImport - Back in Connectivity Hub, the content appears in your list of contents:
Note: The metadata associated with your content is exported/imported.
Use the Metadata page to generate metadata.