Menu & Search
Adding & Removing SQL Features via Command

Adding & Removing SQL Features via Command

This is a quick guide on how to add and remove features from SQL Server via command, following the theme of recent posts.

The following areas will be covered within this post;
# Check Features Installed on a SQL Server.
# Installing a SQL Server Feature (Replication) via Command.
# Uninstalling a SQL Server Feature (Replication) via Command.


Check Features Installed on a SQL Server

A mounted SQL Server ISO is required for us to first RunDiscovery.

SQL Server Run Discovery via Command

That’ll only take a second, and once done we can view the contents of the Summary.txt file to see the discovery result.

SQL Server RunDiscovery Summary File

Installing a SQL Server Feature (Replication) via Command

The command below should be straight-forward enough to understand. See Microsoft’s documentation for more information on parameters etc.

SQL Server Install Feature via Command

We can verify the feature installation by running another Discovery.

SQL Server RunDiscovery Summary File Replication

Uninstalling a SQL Server Feature (Replication) via Command

Uninstalling a feature is as easy as the installation of one. Run the command as shown below.

SQL Server Uninstall Feature via Command

And finally run another Discovery.

SQL Server RunDiscovery via Command Removing Feature