none
How to uninstall an instance of Microsoft SQL Server 2008 R2 RRS feed

  • Question

  • I basically want to uninstall (remove) an instance in SQL Server 2008 R2.  I surfed the net and was not able to find anything that works.  Can someone show me how to do it using PowerShell Script?
    Friday, July 8, 2016 10:49 PM

Answers

  • You don't need Start-Process. Just run the command.


    PS C:\> & 'C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\setup.exe' /Action=Uninstall /InstanceName=SQLEXPRESS /Features="SQL, RS /QUIET"


    -- Bill Stewart [Bill_Stewart]



    Saturday, July 9, 2016 3:55 PM
    Moderator

All replies

  • You have to run the installer with comamndline options targeting the instances.

    \_(ツ)_/

    Friday, July 8, 2016 11:17 PM
  • $setup='C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\setup.exe'
    $arglist='/Action=Uninstall /INSTANCENAME=SQLEXPRESS /FEATURES=SQL, RS /QUIET'
    Start-Process -FilePath $setup -ArgumentList $arglist -NoNewWindow -Wait


    \_(ツ)_/

    Friday, July 8, 2016 11:22 PM
  • You don't need Start-Process. Just run the command.


    PS C:\> & 'C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\setup.exe' /Action=Uninstall /InstanceName=SQLEXPRESS /Features="SQL, RS /QUIET"


    -- Bill Stewart [Bill_Stewart]



    Saturday, July 9, 2016 3:55 PM
    Moderator