Remove SQL Server components

From https://www.mssqltips.com/sqlservertip/4050/cleanly-uninstalling-stubborn-sql-server-components/

Prerequisite MSI Inventory tool, which you can download msiinv_new.zip

You can get the GUID associated with each installed product by searching around the registry, but I would rather use the MSI Inventory tool, which you can download (msiinv_new.zip) from this OneDrive folder, and extract msiinv.exe

PowerShell script to use is:

## Remove SQL Server components
$a = .\msiinv.exe -s | Select-String "SQL Server" -Context 1,1;
$a = $a -replace "Product code:    ","msiexec /x """;
$a = $a -replace ">", "rem";
$a = $a -replace "\t", "";
$a = $a -replace "`}", "`}`" /quiet";
$a | Out-File .\remove.bat -encoding Ascii;
.\remove.bat

 

Advertisements
This entry was posted in tools and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s