Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

SQL Server 2008 does not install DMO by default. Is there a function or script I can use from the command prompt to check remote servers to see if DMO has already been installed? We were using a registry key check but thought that might not be the best option. Any advice is appreciated!

share|improve this question
up vote 0 down vote accepted

I'm assuming you mean SMO (DMO was replaced by SMO in SQL 2005).

You can do this as a quick and dirty test within Powershell:

PS C:\> [Reflection.Assembply]::LoadWithPartialName("Microsoft.SqlServer.Smo")

If SMO is registered it'll come back with some info on where it found the SMO dll and what version it is.

GAC     Version          Location
---     -------          --------
True    v2.0.50727       C:\.........

You could also use this VBS script if you don't want to do it in Powershell:

Dim sqlServer
set sqlServer = CreateObject("Microsoft.SQLServer.Management.SMO.Server")
set sqlServer = nothing

If it returns a runtime error "ActiveX component can't create object: 'Microsoft.SqlServer.Smo.Server'" then SMO not installed (or at least not registered).

share|improve this answer
Sorry, I did not want SMO. DMO installation is required for a bug in SCOM 2007. – Ddono25 Apr 14 '10 at 21:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.