I-Tech PowerShell Scripts

This is our collection of PowerShell scripts that we find useful.

We hope you find them useful too. Some of these scripts modify SQL Server project files or SSIS packages directly. We have tested them on our projects but be sure to MAKE A BACKUP OF YOUR PROJECT before running these scripts on them – it is possible that these scripts will make your project files unusable.

SQL PowerShell Scripts

PowerShell Script Description Script Link
Load a SQL Project file and remove all connection information and source control information. Recurses through all subdirectories and removes connections from those projects also. SQL-Project-RemoveConnections.ps1
Load a SQL Project file and SORT all the files in each project. Set SORT=FALSE and SQL will re-order next time it loads. This functionality relies on SSMS to do the sorting – it just uses the undocumented Sort attribute in SQL projects. SQL-Sort-Project-Files.ps1
Assign a new GUID to all SSIS packages under the selected root. Logging and other functions require a unique GUID to work correctly. If packages have been copied and modified they will have identical GUIDs. This will assign a new GUID and fix those problems. SQL-SSIS-NewPackageGUIDs.ps1

 

All scripts and code Copyright (C) I-Tech Solutions, Inc. under Microsoft Reciprocal License (MS-RL) http://www.microsoft.com/en-us/openness/licenses.aspx unless otherwise noted.

It is your responsibility to ensure that the scripts work as expected in your environment. No warranty is expressed or implied.

Leave a Reply

Your email address will not be published.