The SDL PowerShell Toolkit allows to script the Project Automation API that is available with SDL Trados Studio Professional. In order to use the Project Automation API via the SDL PowerShell Toolkit , a Professional license for SDL Trados Studio is required. PowerShell 2.0 comes pre-installed on Windows 7. On Windows XP, you may need to manually install PowerShell if it is not already installed.
The PowerShell Toolkit consists of 4 modules
GetGuids
PackageHelper
ProjectHelper
TMHelper
and a Sample_Roundtrip.ps1
sample script which contains examples to create translation memories, projects and packages.
- Ensure SDL Trados Studio with a professional license is installed.
- Create the following 2 folders:
C:\users\{your_user_name}\Documents\windowspowershell
C:\users\{your_user_name}\Documents\windowspowershell\modules
- Copy the
Sample_Roundtrip.ps1
intowindowspowershell
folder - Copy the four PowerShell module folders into
modules
folder:....\windowspowershell\modules\GetGuids
....\windowspowershell\modules\PackageHelper
....\windowspowershell\modules\ProjectHelper
....\windowspowershell\modules\TMHelper
- Open the PowerShell (x86) command prompt (since SDL Trados Studio is a 32-bit application)
- Before running script make sure the
$StudioVersion
parameter in the modules corresponds to version of Studio you are using ("Studio4" for Studio 2015, "Studio5" for Studio 2017)
- In the script, ensure the paths to the files to be processed match your directory structure.
- Open a PowerShell command prompt as Administrator
- Change to the directory where your script is located:
e.g.
C:\users\{your_user_name}\Documents\windowspowershell
- Ensure you have rights to run the script. You may first need to enter the following command:
Set-ExecutionPolicy remotesigned
- Run your script: type
.\Sample_Roundtrip
and press enter
If you want to add a new functionality or you spot a bug please fill free to create a pull request with your changes.
If you find an issue you report it here.
- Fixed creation of FileBasedTM
- Updated script to include TM in Project
- The paths to the .dll files are now identified regardless of the operating system (32-bit of 64-bit)
- The user can select which Studio version to use (Studio4 or Studio5)
- The "Sample_Roundtrip.ps1" script now creates a sample text file with custom content
- The "Get-Project" function requires only path to the .sdlproj file as parameter
- The "New-Project" function automatically creates the source file directory
- Updated the "New-FileBasedTM" function from TMHelper module to use the new implemention from Studio
- Updated the "New-Project" function from "Sample_Roundtrip.ps1” to use the new implementation from Studio