Do you have an example of how to run K8S_CMD job using Powershell script?
Products: Workload Automation AE (AutoSys) 12.1.x, 24.x
1. Script Placement
In a Kubernetes (OCP) environment, scripts are not placed on a specific "machine" as they were in legacy Data Centers. Instead, you have two primary options:
Image-based: Bake the .ps1 script directly into your container image (e.g., in /app/scripts/).
ConfigMap/Volume: Store the script in a Kubernetes ConfigMap and mount it as a volume to the pod at runtime.
2. JIL Example for K8S_CMD
When defining the job, you must ensure the k8s_command invokes the PowerShell interpreter.
jil
insert_job: my_powershell_k8s_jobjob_type: K8S_CMDmachine: <your_agent_machine>owner: <owner>k8s_connection_profile: <your_connection_profile>k8s_namespace: <your_namespace>k8s_command: pwsh -File /app/scripts/my_script.ps1k8s_label_selector: app=my-appspool_log_level: DEBUGk8s_security_profile: <value>
3. Key Considerations
Interpreter: Use pwsh for PowerShell Core (standard in Linux containers) or powershell depending on your image.
Execution Policy: If you encounter permission issues, you may need to add -ExecutionPolicy Bypass to the command.
Additional information / resources
Unable to run a job which runs powershell script
To speak with a customer representative or a Support Engineer see Contact Support. Scroll to the bottom of the page and click on the respective region.