The post on the SQLServer blog at TechNet by the SQL Server Tools Team today made me jump out of my seat.
The July update for SSMS includes the first substantial improvement in SQL PowerShell in many years. We owe a lot of thanks for this effort to the great collaboration with our community. We have several new CMDLETs to share with you
In one release there are twenty-five new CMDLets for the new sqlserver module
This means that if you have a PowerShell script doing Import-Module SQLPS, it will need to be changed to be Import-Module SqlServer in order to take advantage of the new provider functionality and new CMDLETs. The new module will be installed to “%Program Files\WindowsPowerShell\Modules\SqlServer” and hence no update to $env:PSModulePath is required.
So SQLPS will still continue to work but will not be updated and will not contain the new CMDlets or the future new CMDlets.
So what new things do we have?
This month we introduce CMDLETs for the following areas:
- Always Encrypted
- SQL Agent
- SQL Error Logs
Chrissy LeMaire has written about the new SQL Agent cmdlets
Aaron Nelson has written about the new Get-SqlErrorLog cmdlet
Laerte Junior has written about Invoke-SQLCmd
All four of us will be presenting a webinar on the new CMDlets via the PowerShell Virtual Chapter Wed, Jul 06 2016 12:00 Eastern Daylight Time If you cant make it a recording will be made available on YouTube on the VC Channel https://sqlps.io/video
Always Encrypted CMDlets
That leaves the Always Encrypted CMDLets and there are 17 of those!
That seems to cover setting up Always Encrypted with PowerShell , removing it and getting information about it. When the new SSMS update is dropped you will be able to start using all of this new functionality.
Just remember Import-Module sqlserver
CALL TO ACTION
Microsoft are engaging with the community to improve the tools we all use in our day to day work. There is are two Trello boards set up for YOU to use to contribute
https://sqlps.io/vote for SQLPS sqlserver PowerShell module
https://sqlps.io/ssms for SSMS
Go and join them and upvote YOUR preferred choice of the next lot of CMDlets
We have also set up a SQL Community Slack for anyone in the community to discuss all things related to SQL including the Trello board items and already it seems a good place for people to get help with 150+ members in a few days. You can get an invite here https://sqlps.io/slack
Come and join us