dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


The Get-DbaSqlManagementObject returns an object with the Version and the Add-Type Load Template for each version on the server.


dbatools - Get-DbaSqlManagementObject


Returns all versions of SMO on the computer


Returns just the version specified. If the version does not exist then it will return nothing.

Get-DbaSqlManagementObject -VersionNumber 13


This command was created by Ben Miller. You can find Ben on Twitter and his blog.


From PowerShell, execute Get-Help Get-DbaSqlManagementObject -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaSqlManagementObject.ps1 on GitHub

Related commands