SQL SMO in PowerShell on server without SQL installed

In order to use SQL SMOs on a server where SQL is not already installed, download and install the following SQL Feature Packs for whatever version you’re using, in the order listed:

1–Microsoft System CLR Types for Microsoft SQL Server

2–Microsoft SQL Server Shared Management Objects

3–Microsoft Windows PowerShell Extensions for Microsoft SQL Server

Before you can add assemblies in your script, you’ll need to reboot the server where the Feature Packs were installed.

To add assemblies, use the Add-Type command:

Add-Type -Assembly Microsoft.SqlServer.SMO

SQL SMO in PowerShell on server without SQL installed

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