- Posts: 3
- Thank you received: 2
PowerShell Support For Package Task
- battlemedialab
- Topic Author
- Offline
- New Member
-
Less
More
1 year 7 months ago #21712
by battlemedialab
PowerShell Support For Package Task was created by battlemedialab
(The ETL Enterprise software is using the latest version, 6.3.10.0.)
I'm in the process of implementing a package to convert & optimize image files on the server and ideally want to automate this via ETL. To give a quick breakdown:
1. PowerShell script converts all product .PNGs into .JPGs inside a specific folder.
2. MSSQL script updates any products with PNGs to now use .JPG file extensions.
3. Another PowerShell script runs JPEGOptim (& OptiPNG on some other folders outside of the previous specific folder).
Step 2 is simple as I've already done this in ETL before, but for Step 1 & Step 3 it appears there isn't a PowerShell object in the package editor.
I presume I would use the "External Application" object, choose "Wait for Application to finish" (as the PowerShell script closes once it finishes), navigate to the PowerShell application for "Application to run"? Would the parameters be the file path for the .ps1 file then?
I'm in the process of implementing a package to convert & optimize image files on the server and ideally want to automate this via ETL. To give a quick breakdown:
1. PowerShell script converts all product .PNGs into .JPGs inside a specific folder.
2. MSSQL script updates any products with PNGs to now use .JPG file extensions.
3. Another PowerShell script runs JPEGOptim (& OptiPNG on some other folders outside of the previous specific folder).
Step 2 is simple as I've already done this in ETL before, but for Step 1 & Step 3 it appears there isn't a PowerShell object in the package editor.
I presume I would use the "External Application" object, choose "Wait for Application to finish" (as the PowerShell script closes once it finishes), navigate to the PowerShell application for "Application to run"? Would the parameters be the file path for the .ps1 file then?
Please Log in or Create an account to join the conversation.
1 year 7 months ago #21713
by admin
Mike
ETL Architect
Replied by admin on topic PowerShell Support For Package Task
Hello and welcome to etl support forum
Please find attached bat file and basic power script example
Please note that if your script runs some third party software and this software interacts with the desktop eg shows a progress bar or messages it will not work inside windows service. This is not a limitation of our software with how windows work
Please find attached bat file and basic power script example
Please note that if your script runs some third party software and this software interacts with the desktop eg shows a progress bar or messages it will not work inside windows service. This is not a limitation of our software with how windows work
Mike
ETL Architect
The following user(s) said Thank You: battlemedialab
Please Log in or Create an account to join the conversation.