New Commands
- Export-SqlUser
Exports SQL Server Database Users creation script with all database permissions (database and object level) to a T-SQL file. This is a function that is not available in SQL Server Management Studio. - Find-DbaAgentJob
Finds agent job(s) that fit certain search criteria. - Find-DbaDatabase
Search SQL Server instances for database that have either the same name, owner or service broker guid. - Find-DbaStoredProcedure
Returns all stored procedures that contain a specific string or regex pattern. - Get-DbaAgentAlert
Return all SQL Agent alerts on a SQL Server Agent. - Get-DbaAgentOperator
Returns all SQL Agent operators on a SQL Server Agent. - Get-DbaDatabaseState
Gets some common “states” on databases like Read-Write (READ_ONLY or READ_WRITE), Status (ONLINE, OFFLINE, EMERGENCY) and Access options (SINGLE_USER, RESTRICTED_USER, MULTI_USER) - Get-DbaHelpIndex
This function will return detailed information on indexes (and optionally statistics) for all indexes in a database, or a given index should one be passed along. - Get-DbaMemoryUsage
Get amount of memory in use by all SQL Server components and instances. SSAS and SSIS are included. - Get-DbaMsdtc
Displays information about the Distributed Transactioon Coordinator (MSDTC) on a server. - Get-DbaPageFileSetting
Returns detailed information about the Windows page file. - Get-DbaTrigger
Get all existing triggers at instance and database level. - Get-DbaUptime
Returns the uptime of the SQL Server instance. If you want you can get the value for the hosting windows server too. - Get-DbaXEventsSession
Retrieves a list of Extended Events Sessions. - Invoke-SqlCmd2
Runs a T-SQL script. But only captures the first selected result set, such as the output of PRINT statements when Verbose parameter is specified.
A big plus when comparing with native Invoke-SqlCmd cmdlet is that this one supports parameterized queries. - New-DbaDatabaseSnapshot
Do you need to create a database snapshot? This command will do it without hassles. - Out-DbaDataTable
Will creates a DataTable based on an objects properties.
This allows you to easily write to SQL Server tables. - Rename-DbaLogin
It can be a pain to update all of the mappings for a specific user when you rename a SQL login this does it for you, will rename login and database mapping for a specified login. - Restore-DbaFromDatabaseSnapshot
Restores the database from the snapshot, discarding every modification made to the database. - Set-DbaDatabaseState
Want to change a database state? With this command you can chose between ReadOnly, ReadWrite, Online, Offline, Emergency, plus a special “Detached”, SingleUser, RestrictedUser, MultiUser. - Test-DbaOptimizeForAdHoc
Displays information relating to SQL Server Optimize for AdHoc Workloads setting. - Write-DbaDataTable
Quickly and efficiently writes data to a SQL Server Table using a .NET DataTable to a SQL Server table using SQL Bulk Copy.
Improvements
- Test-SqlMigrationConstraint
Added support for SQL Server 2016 SP1 outstanding news! Almost all editions supports what was, until now, Enterprise features only. (#512) - Get-SqlServerKey
Added support for SQL Server 2016 (#610) - Copy-SqlLogin
If you try to transfer a local account (non-domain) you get a "Skipped", because is a local machine account. (#275)
Notable bug fixes
- Copy-SqlDatabase
Fixed an issue where -WithReplace was not working properly (#601) - Expand-SqlTLogResponsibly
Fixed an issue where Expand-SqlTLogResponsibly grew TLog all at once. (#503) - Remove-SqlOrphanUser
Fixed an issue where Remove-SqlOrphanUser fails when the user was the owner of one or more schemas. (#296) - Remove-SqlDatabaseSafely
Remove-SqlDatabaseSafely failed to perform final drop w/ no additional information. (#238)