Hello SSC,The objective here is to dynamically update all dtsconfig files for deployment on three tier architecture (dev, UAT, prod), to make deployment easier and more efficient. We have several SSIS packages which have individual config files per package (OH NO!). My idea is to modify the elements in the dtsconfig to eventually accept ServerName and DB parameters from SSIS variables. I then want to pass those variables into a PS script to modify all config files in a specified directory. For now, I just want to see if I can actually make this work in one config file with hard-coded values.The following script runs successfully but the dtsconfig file does not accept any of my changes. What am I doing wrong? :unsure:Any help would be greatly appreciated![b]# Set-ExecutionPolicy RemoteSignedls C:\.dtsConfig | foreach { $file = $_."C:\*.dtsConfig" $xml = [xml](Get-Content $file) $UpdateStr = "kjdfhgkjdfhgkdjfhg" @($xml.SelectNodes('//GeneratedBy')) | %{ $_.'#text'=($_.'#text' -replace '_\d+',$UpdateStr) } $xml.Save($file)}[i][u][/u][/i][/b]
↧