Last active
December 22, 2015 11:36
-
-
Save matt40k/a801c88313561b985415 to your computer and use it in GitHub Desktop.
Update SSIS package with a new var name or such
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dtsFiles = Get-ChildItem "C:\GIT\BusinessIntelligence\" -Filter *.dts | |
Foreach($dtsFile in $dtsFiles) | |
{ | |
Write-Host $dtsFile.FullName | |
$dtsContents = Get-Content $dtsFile.FullName | |
$dtsContents = $dtsContents -replace "audit.USP_ErrorLog", "[Audit].[USP_ErrorLog]" | |
$dtsContents = $dtsContents -replace "audit.USP_JobLog", "[Audit].[USP_JobLog]" | |
$dtsContents = $dtsContents -replace "audit.USP_RunTableRowCounts", "[Audit].[USP_RunTableRowCounts]" | |
$result = Set-Content $dtsFile.FullName $dtsContents -Encoding UTF8 # Need to set the encoding as PowerShell didn't honour the original and the (C) caused diff changes (and prob errors | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment