need to add sql server 2016 snapin to Powershell

Hey everybody

I hope that you are fine

I need to know the name of the SQL Server 2016 snapin on power shell and how can I download it

Best Regards


AFAIK, It should come along with SQL 2016 installation and the module name would be SQLPS.

There’s a base version of the module that’s included with an install of SQL server usually but focus has moved to the SQLServer module on the PSGallery. Using this module will keep you the most up-to-date.


Install-Module SQLServer


On the SQL server, just as PowerShell for it…
There is no download required.

PS C:\Scripts> Get-Module -ListAvailable "*sql*"

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands                                                                                         
---------- -------    ----                                ----------------                                                                                         
Manifest   20.0       SqlServer                           {Add-SqlColumnEncryptionKeyValue, Complete-SqlColumnMasterKeyRotation, Get-SqlColumnEncryptionKey, Get...

    Directory: C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules

ModuleType Version    Name                                ExportedCommands                                                                                         
---------- -------    ----                                ----------------                                                                                         
Manifest   2.0        SQLASCMDLETS                        {Add-RoleMember, Backup-ASDatabase, Invoke-ASCmd, Invoke-ProcessCube...}                                 
Manifest   1.0        SQLPS                               {Backup-SqlDatabase, Save-SqlMigrationReport, Add-SqlAvailabilityDatabase, Add-SqlAvailabilityGroupLis...

See also MS docs about it:
SQL Server PowerShell

PowerShell changes and new cmdlets for SQL Server 2016