How to deal with SqlServer PS module

  • I understand that SqlServer has replaced SQLPS.  I experienced this with SQL 2017.  I'm now putting together a SQL 2019 with server 2019 and I see that SQLPS is still part of an install.

    PS C:\Windows\system32> get-module sqlps -ListAvailable

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

    ModuleType Version Name ExportedCommands

    ---------- ------- ---- ----------------

    Manifest 15.0 SQLPS {Backup-SqlDatabase, Save-SqlMigrationReport, Invoke-Polic...

    Before I do an install of SqlServer module, is it advised to uninstall SQLPS first?  I did try to install SqlServer without trying to remove SQLPS and I'm then presented with all sorts of red text

    PackageManagement\Install-Package : The following commands are already available on this system:'Add-SqlAvailabilityDatabase,Add-SqlAvailabilityGroupListenerStaticIp,Add-SqlFirewallRule,Backup-SqlDatabase,blah blah blah....'. This module 'SqlServer' may override the existing commands. If you still want to install this module 'SqlServer', use -AllowClobber parameter.

    Should one just -AllowClobber?  When I do that, both SQLPS and SqlServer appear to be installed.

    Please advise and thanks!

    • This topic was modified 2 years, 2 months ago by  NotBob.
    • This topic was modified 2 years, 2 months ago by  NotBob.
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • Since I'm not getting much for suggestions on this topic, is there another source or forum that might be able to assist?


  • I'm experiencing exactly the same issue. Cannot use a certain function of invoke-sqlcmd because of the sqlps module installed with 2019 and cannot seem to remove it and replace it with sqlserver.



  • This was removed by the editor as SPAM

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply