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.

[pre]

Install-Module SQLServer

[/pre]

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
https://docs.microsoft.com/en-us/sql/powershell/sql-server-powershell?view=sql-server-2017

and…
PowerShell changes and new cmdlets for SQL Server 2016
https://www.mssqltips.com/sqlservertip/4513/powershell-changes-and-new-cmdlets-for-sql-server-2016