SSIS packages are XML files and PowerShell have a good support to handle & modify XML files.
See for example https://stackoverflow.com/questions/16428559/powershell-script-to-update-xml-file-content
Edit SSIS package using powershell
Hi.
I have around 200 SSIS packages, in which I want to make few edits.
I am trying to check if Powershell can solve this issue. I have a specific location in which all my SSIS packages are kept. In each of the SSIS package, there is a GetConnection method. Inside the method , I want to find the first instance of the text GetConnection = strConnection , and add another connection string property before it and save the file.
This process should be repeated for all the files. How to achieve this in Powershell ?
Thanks
2 answers
Sort by: Most helpful
-
Olaf Helper 41,006 Reputation points
2021-04-09T08:39:29.367+00:00 -
Ian Xue (Shanghai Wicresoft Co., Ltd.) 30,386 Reputation points Microsoft Vendor
2021-04-12T05:13:12.483+00:00 Hi,
You can match text with a regular expression. Please refer to this link for more details.
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_regular_expressionsBest Regards,
Ian Xue============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.