• User's guide
  • API
Search Results for

    Show / Hide Table of Contents
    • Concepts
    • Installation
    • Configuration
      • Overview
      • License
      • Datasources
      • Configuration
      • Plug-Ins
      • Codepages
      • Environment Variables
      • Include files
      • Example
    • Jobs
      • Jobs
      • Include
      • Multi-Threaded Jobs
      • Tracking Jobs
    • Tasks
      • Overview
      • Copy Check
      • Excel
      • File Compare
      • File Copy
      • File Dump
      • File Edit
      • File Format
      • Foreach
      • Generate
      • IMS/DB Data Conversion
      • JCL Submit
      • Listcat
      • Log
      • Powershell
      • Set Environment Variable
      • Sql
      • Stored Procedure Compare
      • Table Compare
      • Table Copy
      • Table Load
      • Table Scan
      • Table Unload
      • User Script
    • Layouts
      • Overview
      • XML Definition
      • COBOL Definition
      • Field data Types
    • Extensibility
      • Extending Ianus
      • Column Comparators
      • Column Converters
      • Record Comparators
      • File Editors
      • User Script
      • Record Layout Match Class
      • Column Layout Match Class
      • User Fields
      • Codepages
      • Resources
    • Usage
      • Command Line
      • Monitors
      • Programmatically
      • Unit Testing
    • Known Issues
    • Disclaimers

    PowerShell

    The PowerShell task (powershell) allows user to run PowerShell 6 (or higher) scripts. Powershell must be installed on the system where Ianus is executed.

    The script can be included in the task XML or referenced thru the attribute path.

    Attribute Type Purpose
    path string Path of the script to be executed

    Ianus API

    Ianus API are available thru the following object instances

    Object name Class
    $Env HPE.Ianus.Environment
    $Job HPE.Ianus.Job
    $Task HPE.Ianus.Task
    $Log HPE.Ianus.Log.LoggerFacade

    Example

    <job multithread="false">
      <powershell name="STEP01">
         echo "I am PowerShell $($PSVersionTable.PSVersion)"
         echo "In job $($Job.Name) and task $($Task.Name)"
      </powershell>
      <powershell name="STEP02" path="PowerShell.ps1"/>
    </job>
    

    Status codes

    Status Status code Description
    Ready -1 Task is initialized, but not yet started
    Running -2 Task is running
    Success 0 Task completed successfully
    Warnings 1 Task completed with warnings
    Errors 2 Task completed with errors
    Aborted 9 Task cannot be executed
    In This Article
    Back to top Copyright 2021 - Hewlett-Packard Enterprise